Skip to content

Commit 9a14373

Browse files
fix: move release condition to npm publish step in publish.yml
1 parent 88f2e65 commit 9a14373

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ jobs:
1111
publish-npm:
1212
name: Publish to npmjs.com
1313
runs-on: ubuntu-latest
14-
if: github.event_name == 'release'
1514
permissions:
1615
contents: read
1716
id-token: write
@@ -24,13 +23,13 @@ jobs:
2423
- run: npm ci
2524
- run: npm run build
2625
- run: npm publish --provenance --access public
26+
if: github.event_name == 'release'
2727
env:
2828
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2929

3030
publish-github:
3131
name: Publish to GitHub Packages
3232
runs-on: ubuntu-latest
33-
if: github.event_name == 'release'
3433
permissions:
3534
contents: read
3635
packages: write
@@ -43,6 +42,7 @@ jobs:
4342
- run: npm ci
4443
- run: npm run build
4544
- run: npm publish
45+
if: github.event_name == 'release'
4646
env:
4747
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4848

0 commit comments

Comments
 (0)