Skip to content

Commit b488cc4

Browse files
committed
Update publish.yml
1 parent 7cb99d1 commit b488cc4

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

.github/workflows/publish.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,34 @@
11
name: Publish
22

33
on:
4-
release:
5-
types:
6-
- published
4+
push:
5+
branches:
6+
- main
77

88
jobs:
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 }}

0 commit comments

Comments
 (0)