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 77e50ac commit 327c1b8
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
name: Publish npm
on:
push:
branches:
- master
tags:
- 'v0.**'
- v0.*

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

- name: Beta
if: ${{ contains(github.ref, '-beta') }}
if: ${{ endsWith(github.ref, '-beta') }}
run: yarn publish --tag beta
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Current version
if: ${{ !contains(github.ref, '-beta') }}
if: ${{ !endsWith(github.ref, '-beta') }}
run: yarn publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 327c1b8

Please sign in to comment.