Skip to content

ci(release): upgrade npm to 11+ for trusted-publisher OIDC auth#121

Merged
stackbilt-admin merged 1 commit intomainfrom
ci/upgrade-npm-11
Apr 18, 2026
Merged

ci(release): upgrade npm to 11+ for trusted-publisher OIDC auth#121
stackbilt-admin merged 1 commit intomainfrom
ci/upgrade-npm-11

Conversation

@stackbilt-admin
Copy link
Copy Markdown
Member

Summary

#120 removed the token plumbing expecting npm's --provenance flag to drive OIDC-based publish auth. It doesn't — --provenance only signs attestations via OIDC. Publish auth via OIDC for trusted publishers requires npm 11.5.1+, which is newer than what setup-node bundles with Node 20 (currently ~10.x).

Result on the v0.12.0 retry: ENEEDAUTH — the CLI had no token (correct end state after #120) but didn't know how to use OIDC for auth.

Change

Add npm install -g npm@latest as a step before dependency install. npm 11.12.1 as of 2026-04-18 has first-class trusted-publisher OIDC auth.

Test plan

  • Merge.
  • gh workflow run release.yml -f tag=v0.12.0 — idempotent, nothing published yet for 0.12.0.
  • All 11 @stackbilt/* packages publish via OIDC at 0.12.0.
  • Provenance badge appears on each package's npmjs.com page.
  • Follow-up: delete unused NPM_TOKEN repo secret.

History

🤖 Generated with Claude Code

The prior fix (#120) removed token plumbing expecting npm's
`--provenance` flag to drive OIDC-based publish auth. It doesn't —
`--provenance` only signs attestations via OIDC. Publish auth via
OIDC for trusted publishers requires **npm 11.5.1+**, which is
newer than what setup-node bundles with Node 20 (currently ~10.x).

Result: v0.12.0 publish returned ENEEDAUTH — the CLI had no token
(correct end state) but didn't know how to use OIDC for auth.

Fix: install npm@latest globally before the publish step. 11.12.1
as of 2026-04-18 has first-class trusted-publisher OIDC auth.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@stackbilt-admin stackbilt-admin merged commit ef66cd2 into main Apr 18, 2026
3 checks passed
@stackbilt-admin stackbilt-admin deleted the ci/upgrade-npm-11 branch April 18, 2026 11:45
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