Skip to content

Commit b9ce812

Browse files
committed
release in ci
1 parent d606f00 commit b9ce812

2 files changed

Lines changed: 17 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
11
name: Release
22

33
on:
4-
release:
5-
types: [published]
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
permissions:
9+
contents: write
610

711
jobs:
12+
github:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- run: gh release create ${{ github.ref_name }} --generate-notes
17+
env:
18+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
19+
820
npm:
21+
needs: github
922
runs-on: ubuntu-latest
1023
permissions:
1124
contents: read
@@ -19,6 +32,7 @@ jobs:
1932
- run: npm publish --access public
2033

2134
homebrew:
35+
needs: github
2236
runs-on: ubuntu-latest
2337
steps:
2438
- uses: mislav/bump-homebrew-formula-action@v3

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@
3737
"node": ">=18"
3838
},
3939
"scripts": {
40-
"release": "git tag v$npm_package_version && git push origin v$npm_package_version && gh release create v$npm_package_version --generate-notes"
40+
"release": "git tag v$npm_package_version && git push origin v$npm_package_version"
4141
}
4242
}

0 commit comments

Comments
 (0)