Skip to content

fix(ci): upgrade npm for OIDC trusted publishing - #9

Merged
htnabe merged 1 commit into
mainfrom
dev
Sep 13, 2026
Merged

htnabe merged 1 commit into
mainfrom
dev

Conversation

@htnabe

@htnabe htnabe commented Sep 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fix npm publish 404 failures during the Publish Release workflow

Changes

  • Explicitly upgrade npm to ^11.5.1 after actions/setup-node in publish.yml, since Node 22 bundles npm 10.9.x which does not perform the OIDC token exchange required for Trusted Publishing
  • Document the npm version requirement and the need for a registered Trusted Publisher entry on npmjs.com in docs/development/publishing.md

Root cause

Node 22's bundled npm (10.9.3) predates automatic OIDC token exchange support (requires npm >= 11.5.1). Without it, npm publish sent an unauthenticated request, and npm returns 404 (not 401/403) for scoped packages when unauthenticated, masking the real auth failure.

Validation

  • YAML syntax validated with python3 yaml.safe_load
  • bun run format:check

Risks

  • None expected; this only affects the manual publish workflow.

Checklist

  • Conventional commit(s) with gitemoji used
  • Commit granularity is meaningful
  • Tests and lint were run as appropriate
  • Documentation updated if needed

Node 22 bundles npm 10.9.x, which predates npm's automatic OIDC token exchange for Trusted Publishing (requires npm >= 11.5.1). Without an explicit upgrade, npm publish sends an unauthenticated request and the registry returns 404 for the existing scoped package instead of an auth error.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@htnabe
htnabe merged commit 2e52e8a into main Sep 13, 2026
1 check passed
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

2 participants