diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml index 424477da..6c60ac78 100644 --- a/.github/workflows/publish-npm.yml +++ b/.github/workflows/publish-npm.yml @@ -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 @@ -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 }}