Skip to content

fix: use NPM_TOKEN for changesets publish auth#98

Merged
braden-w merged 1 commit intomainfrom
braden-w/fix-ci-failure
Feb 26, 2026
Merged

fix: use NPM_TOKEN for changesets publish auth#98
braden-w merged 1 commit intomainfrom
braden-w/fix-ci-failure

Conversation

@braden-w
Copy link
Collaborator

@braden-w braden-w commented Feb 26, 2026

The publish workflow has been failing with a 403 Forbidden on npm publish. The root cause: changesets/action@v1 looks for an env var called NPM_TOKEN to authenticate, not NODE_AUTH_TOKEN. When it doesn't find NPM_TOKEN, it falls back to OIDC trusted publishing, which also fails because changesets/action doesn't properly support OIDC yet (changesets/action#515).

The fix is just pointing at the right env var name. Two other cleanups follow from this:

  • Removed registry-url from setup-nodechangesets/action generates its own .npmrc using NPM_TOKEN, so the setup-node registry config was redundant (and potentially conflicting).
  • Removed id-token: write permission — we're using token auth, not OIDC. No reason to request OIDC permissions we don't use.

Requires the repo secret to be renamed from NODE_AUTH_TOKENNPM_TOKEN in Settings → Secrets and variables → Actions (already done).

changesets/action checks for NPM_TOKEN env var, not NODE_AUTH_TOKEN.
Without it, the action falls back to OIDC which fails with 403.

Also removed registry-url from setup-node (changesets generates its
own .npmrc) and id-token permission (not using OIDC).
@braden-w braden-w merged commit e969fd2 into main Feb 26, 2026
2 checks passed
@braden-w braden-w deleted the braden-w/fix-ci-failure branch February 26, 2026 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant