Skip to content

Commit 4c233a9

Browse files
committed
Update publish-npm.yml
1 parent ad75a61 commit 4c233a9

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/publish-npm.yml

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

77
jobs:
88
publish:
9+
if: { github.ref == 'refs/heads/master' }
910
runs-on: ubuntu-latest
1011
steps:
1112
- uses: actions/checkout@v3
@@ -18,13 +19,13 @@ jobs:
1819
- run: yarn build
1920

2021
- name: Beta
21-
if: ${{ startsWith(github.ref, 'refs/tags/') && endsWith(ithub.ref, '-beta') }}
22+
if: ${{ endsWith(github.ref, '-beta') }}
2223
run: yarn publish --tag beta
2324
env:
2425
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2526

2627
- name: Current version
27-
if: ${{ startsWith(github.ref, 'refs/tags/') && !endsWith(ithub.ref, '-beta') }}
28+
if: ${{ !endsWith(github.ref, '-beta') }}
2829
run: yarn publish
2930
env:
3031
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)