Skip to content

Commit 9d92458

Browse files
jdevalkclaude
andcommitted
ci: drop NPM_TOKEN and registry-url from publish.yml
Same fix that just landed in seo-graph's release.yml. With registry-url set, actions/setup-node writes a .npmrc file referencing ${NODE_AUTH_TOKEN} and injects a placeholder, which npm publish then tries to use instead of OIDC trusted publishing. And the NODE_AUTH_TOKEN env mapping from NPM_TOKEN explicitly shadows OIDC too. @jdevalk/emdash-plugin-seo already has trusted publishing configured on npmjs.com for this repo + publish.yml, so authentication flows through the GitHub Actions OIDC token once the token paths are out of the way. id-token: write was already set at the job level. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f5ffe12 commit 9d92458

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

.github/workflows/publish.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@ jobs:
1616
- uses: actions/setup-node@v5
1717
with:
1818
node-version: 22
19-
registry-url: https://registry.npmjs.org
19+
# Deliberately no `registry-url` here. When set, setup-node
20+
# writes a `.npmrc` referencing ${NODE_AUTH_TOKEN} and injects
21+
# a placeholder token that npm publish then tries to
22+
# authenticate with, bypassing OIDC trusted publishing.
23+
# Leaving it off means no `.npmrc` is created, npm uses the
24+
# default registry (npmjs.org), and trusted publishing can
25+
# authenticate via the GitHub Actions OIDC token.
2026
- run: npm publish --provenance --access public
21-
env:
22-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)