Skip to content

Commit 964ed5e

Browse files
committed
refactor: update environment variable usage in publish workflow
1 parent bc8152c commit 964ed5e

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

.github/workflows/publish.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ jobs:
1212
publish:
1313
runs-on: ubuntu-latest
1414
environment: npm
15+
env:
16+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1517
permissions:
1618
contents: read
1719
id-token: write
@@ -34,11 +36,11 @@ jobs:
3436
run: npm run verify
3537

3638
- name: Publish with trusted publishing
37-
if: ${{ secrets.NPM_TOKEN == '' }}
39+
if: ${{ env.NPM_TOKEN == '' }}
3840
run: npm publish --access public
3941

4042
- name: Publish with token fallback
41-
if: ${{ secrets.NPM_TOKEN != '' }}
43+
if: ${{ env.NPM_TOKEN != '' }}
4244
run: npm publish --provenance --access public
4345
env:
44-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
46+
NODE_AUTH_TOKEN: ${{ env.NPM_TOKEN }}

0 commit comments

Comments
 (0)