build: better releasing workflow
This commit is contained in:
18
.github/workflows/release.yaml
vendored
18
.github/workflows/release.yaml
vendored
@@ -14,10 +14,24 @@ jobs:
|
||||
|
||||
- uses: fregante/setup-git-user@v1
|
||||
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: '**/node_modules'
|
||||
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
|
||||
|
||||
- name: build
|
||||
run: |
|
||||
npm ci
|
||||
npm run release
|
||||
npm ci && npm run build
|
||||
git add . && git commit -am 'build(index.js): build'
|
||||
|
||||
- name: Bump version and push tag
|
||||
id: changelog
|
||||
uses: TriPSs/conventional-changelog-action@v2
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
git-message: 'chore(release): {version}'
|
||||
tag-prefix: ''
|
||||
preset: ''
|
||||
|
||||
- name: Create github Release
|
||||
uses: actions/create-release@v1
|
||||
|
@@ -9,9 +9,7 @@
|
||||
"style:prettier": "prettier \"src/**/*.ts\" --list-different --write",
|
||||
"build": "./node_modules/.bin/ncc build src/index.ts -o ./",
|
||||
"dev": "ts-node-dev src/index.ts",
|
||||
"prerelease": "npm run build",
|
||||
"release": "HUSKY_SKIP_HOOKS=1 standard-version",
|
||||
"postrelease": "git push origin main --follow-tags"
|
||||
"prerelease": "npm run build && "
|
||||
},
|
||||
"keywords": [
|
||||
"github",
|
||||
|
Reference in New Issue
Block a user