From 327c1b88d97428684bc3d84b94cbe50bf19a0778 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxim=20B=C3=A9nadon?= Date: Mon, 5 Jun 2023 14:10:44 +0200 Subject: [PATCH] Update publish-npm.yml --- .github/workflows/publish-npm.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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 }}