Skip to content

Commit 4c11ddc

Browse files
authored
Clarify npm publish step in release workflow
Updated comments for clarity on npm publishing and authentication.
1 parent 83d6d4c commit 4c11ddc

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

.github/workflows/release-publish.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
permissions:
3333
contents: write
3434
packages: write
35-
id-token: write
35+
id-token: write # Required for npm Trusted Publishing
3636
steps:
3737
- name: Checkout code
3838
uses: actions/checkout@v4
@@ -44,6 +44,8 @@ jobs:
4444
uses: actions/setup-node@v4
4545
with:
4646
node-version: '18.x'
47+
# This registry-url is crucial; it tells npm to use registry.npmjs.org
48+
# and prepares the .npmrc for OIDC authentication.
4749
registry-url: 'https://registry.npmjs.org'
4850

4951
- name: Setup Bun
@@ -112,6 +114,5 @@ jobs:
112114
GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }}
113115

114116
- name: Publish to npm
117+
# No env variable needed here; auth is handled by id-token and registry-url
115118
run: npm publish --access public --provenance --tag ${{ github.event.inputs.dist_tag || 'latest' }}
116-
env:
117-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)