Skip to content

Commit

Permalink
feat: sematic release
Browse files Browse the repository at this point in the history
  • Loading branch information
star0202 committed Apr 5, 2023
1 parent 7dc0ef2 commit 3ecd888
Show file tree
Hide file tree
Showing 3 changed files with 1,597 additions and 2 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release

on:
push:
branches:
- master
- stable

jobs:
release:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 19
- name: Enable corepack
run: corepack enable
- name: Install dependencies
run: pnpm i
- name: Semantic release
run: pnpm run release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
15 changes: 13 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"eslint-plugin-prettier": "^4.2.1",
"jest": "^29.5.0",
"prettier": "^2.8.7",
"semantic-release": "^21.0.1",
"ts-jest": "^29.0.5",
"ts-node": "^10.9.1",
"typescript": "^5.0.3"
Expand All @@ -41,7 +42,17 @@
"scripts": {
"lint": "eslint src --ignore-path .gitignore",
"test": "jest",
"build": "tsc"
"build": "tsc",
"release": "semantic-release"
},
"packageManager": "pnpm@7.30.0"
"packageManager": "pnpm@7.30.0",
"release": {
"branches": [
"stable",
{
"name": "master",
"prerelease": true
}
]
}
}
Loading

0 comments on commit 3ecd888

Please sign in to comment.