Skip to content

Commit

Permalink
Fix the publish workflow to run on pull requests
Browse files Browse the repository at this point in the history
  • Loading branch information
DemianParkhomenko committed Jun 11, 2024
1 parent e7db4dd commit 2f33084
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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 }}

0 comments on commit 2f33084

Please sign in to comment.