diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 5f163c1..ddccc7e 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -2,8 +2,9 @@ name: Publish NPM package on: push: - branches: - - main + branches: [main] + pull_request: + branches: [main] env: CLOUDAMQP_API_KEY: ${{ secrets.CLOUDAMQP_API_KEY }} @@ -21,5 +22,6 @@ jobs: - run: npm run build - run: npm test - uses: JS-DevTools/npm-publish@v1 + if: ${{ github.ref == 'refs/heads/main' }} with: token: ${{ env.NPM_TOKEN }}