Skip to content

ci(publish): use npm CLI for publish to enable trusted publisher OIDC auth#9

Merged
0xkkkn merged 1 commit into
mainfrom
chore/dev-132-publish-fix-npm
May 7, 2026
Merged

ci(publish): use npm CLI for publish to enable trusted publisher OIDC auth#9
0xkkkn merged 1 commit into
mainfrom
chore/dev-132-publish-fix-npm

Conversation

@0xkkkn

@0xkkkn 0xkkkn commented May 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Switches the publish step from pnpm publish to npm publish and bumps Node to 22 + installs latest npm. The previous OIDC publish run failed because pnpm publish does not request the OIDC auth token from GitHub Actions (it only requests the OIDC token for provenance signing). Trusted publisher OIDC authentication is implemented in npm CLI ≥ 11.5.1.

Why

After PR #8 (removed NPM_TOKEN), the publish workflow run 25510021658 failed:

npm notice publish Signed provenance statement with source and build information from GitHub Actions
npm error 404 Not Found - PUT https://registry.npmjs.org/@privara%2fsdk - Not found

Provenance was signed (Sigstore log entry) but the PUT to npm registry was rejected. Reason: pnpm signs provenance via OIDC but does not authenticate the publish request via OIDC. npm CLI does both natively when invoked with --provenance.

What

  • node-version: 18 → 22
  • New step: npm install -g npm@latest (Node 22 ships with npm 10.x, we need ≥ 11.5.1)
  • pnpm publish --no-git-checks --provenance --access publicnpm publish --provenance --access public
  • Build/test/typecheck remain on pnpm — only the final publish step changes.

Test plan

Linked

@0xkkkn
0xkkkn requested a review from a team as a code owner May 7, 2026 17:42
@0xkkkn
0xkkkn merged commit ae6b0bf into main May 7, 2026
1 check passed
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