Skip to content

ci(release): swap pnpm for npm for trusted-publisher OIDC#119

Merged
stackbilt-admin merged 1 commit intomainfrom
ci/npm-publish-oidc-swap
Apr 18, 2026
Merged

ci(release): swap pnpm for npm for trusted-publisher OIDC#119
stackbilt-admin merged 1 commit intomainfrom
ci/npm-publish-oidc-swap

Conversation

@stackbilt-admin
Copy link
Copy Markdown
Member

Summary

  • v0.12.0 tag push failed at publish-npm with E404 on @stackbilt/adf — npm's stealth 404 for trusted-publisher auth rejection. Trusted-publisher config on all 11 packages verified identical (Org Stackbilt-dev, Repo charter, Workflow release.yml, Env blank).
  • Root cause hypothesis: pnpm 9's --provenance signs attestations via OIDC but still authenticates the publish request with NODE_AUTH_TOKEN. When a package has a trusted publisher configured, npm may require the publish auth itself to be OIDC-based — and rejects token auth with a 404.
  • npm CLI (10+, bundled with actions/setup-node@v6.3.0) has first-class trusted-publisher OIDC support: npm publish --provenance does the full OIDC-based publish auth that trusted publishers expect.
  • One-line swap: pnpm -r publish --access public --no-git-checks --provenancenpm publish --workspaces --access public --provenance.

Why npm publish --workspaces works

Root package.json declares "workspaces": ["packages/*"], so npm publish --workspaces iterates every non-private workspace and publishes each. All 11 @stackbilt/* packages have "private": false + "publishConfig": { "access": "public" }.

NODE_AUTH_TOKEN env retained as belt-and-braces in case any package doesn't yet have a trusted publisher — harmless otherwise.

Test plan

  • Merge this PR.
  • Re-dispatch existing tag: gh workflow run release.yml -f tag=v0.12.0. Idempotent — no 0.12.0 tarballs have shipped yet.
  • Verify all 11 @stackbilt/* packages at 0.12.0 on npm.
  • Verify the Provenance badge on each package's npmjs.com page.
  • If the same 404 appears, pivot to shipping without provenance (drop --provenance as a hotfix) — trusted-publisher config has a deeper issue beyond the three visible UI fields.

Related

🤖 Generated with Claude Code

…OIDC

pnpm 9's `--provenance` attaches attestations via OIDC but still
uses NODE_AUTH_TOKEN for publish auth. npm CLI's `--provenance`
does the full OIDC-based publish auth that npm trusted publishers
expect.

v0.12.0 release attempts returned `E404` on the first package
(@stackbilt/adf) — npm's stealth 404 for trusted-publisher auth
rejection. Trusted-publisher config verified identical across all
11 packages; hypothesis is that pnpm's token-auth path is being
rejected by npm for packages with trusted-publisher configured.

`npm publish --workspaces` iterates all non-private packages in
`packages/*/` (root package.json declares the workspace glob).
NODE_AUTH_TOKEN retained as belt-and-braces for any package
without a trusted publisher.

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