File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed
Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change 11name : Publish
22
33on :
4- release :
5- types :
6- - published
4+ push :
5+ branches :
6+ - main
77
88jobs :
99 publish :
10+ if : startsWith(github.event.head_commit.message, 'v')
1011 runs-on : ubuntu-latest
1112 steps :
1213 - uses : actions/checkout@v2
1314 - uses : actions/setup-node@v1
1415 with :
15- node-version : 14
16+ node-version : 15
1617 registry-url : https://registry.npmjs.org
1718 - name : Setup pnpm
1819 run : npm add -g pnpm
1920 - name : Install dependencies
20- run : pnpm i
21+ run : pnpm install
2122 - name : Test
22- run : pnpm t
23+ run : pnpm test
2324 - name : Publish
2425 run : npm publish
2526 env :
2627 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
28+ - name : Create Release
29+ uses : actions/create-release@v1
30+ env :
31+ GITHUB_TOKEN : ${{ github.token }}
32+ with :
33+ tag_name : ${{ github.event.head_commit.message }}
34+ release_name : ${{ github.event.head_commit.message }}
You can’t perform that action at this time.
0 commit comments