Skip to content

Commit 327c1b8

Browse files
committed
Update publish-npm.yml
1 parent 77e50ac commit 327c1b8

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

.github/workflows/publish-npm.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
name: Publish npm
22
on:
33
push:
4-
branches:
5-
- master
64
tags:
7-
- 'v0.**'
5+
- v0.*
86

97
jobs:
108
publish:
9+
if: { github.ref == 'refs/heads/master' }
1110
runs-on: ubuntu-latest
1211
steps:
1312
- uses: actions/checkout@v3
@@ -20,13 +19,13 @@ jobs:
2019
- run: yarn build
2120

2221
- name: Beta
23-
if: ${{ contains(github.ref, '-beta') }}
22+
if: ${{ endsWith(github.ref, '-beta') }}
2423
run: yarn publish --tag beta
2524
env:
2625
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2726

2827
- name: Current version
29-
if: ${{ !contains(github.ref, '-beta') }}
28+
if: ${{ !endsWith(github.ref, '-beta') }}
3029
run: yarn publish
3130
env:
3231
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)