Skip to content

Commit

Permalink
Update publish-npm.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
shakaman committed Jun 5, 2023
1 parent ad75a61 commit 4c233a9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: Publish npm
on:
push:
branches:
- master
tags:
- v0*

jobs:
publish:
if: { github.ref == 'refs/heads/master' }
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -18,13 +19,13 @@ jobs:
- run: yarn build

- name: Beta
if: ${{ startsWith(github.ref, 'refs/tags/') && endsWith(ithub.ref, '-beta') }}
if: ${{ endsWith(github.ref, '-beta') }}
run: yarn publish --tag beta
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

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

0 comments on commit 4c233a9

Please sign in to comment.