Skip to content

ci(release): switch to npm Trusted Publishing via OIDC#29

Merged
MyPrototypeWhat merged 1 commit into
mainfrom
claude/ci-failure-404-43tNs
May 28, 2026
Merged

ci(release): switch to npm Trusted Publishing via OIDC#29
MyPrototypeWhat merged 1 commit into
mainfrom
claude/ci-failure-404-43tNs

Conversation

@MyPrototypeWhat
Copy link
Copy Markdown
Owner

Why

Release workflow was failing with ERR_PNPM_OTP_NON_INTERACTIVE — npm 2FA "auth and writes" requires an OTP on publish, which a non-Automation token cannot satisfy in a non-interactive CI shell. Earlier 404s were the same auth path failing differently before the token rotation.

Versions core@3.5.0, ai-sdk-middleware@1.3.5, tanstack-ai@0.4.5 were bumped on main (#28) but never published as a result.

What

  • Add id-token: write to the release job so GitHub Actions can mint a short-lived OIDC token.
  • Drop NPM_TOKEN env — pnpm will use OIDC to authenticate against npm.

Prereq (done on npm side)

Trusted publishers configured on each of @context-chef/core, @context-chef/ai-sdk-middleware, @context-chef/tanstack-ai pointing to MyPrototypeWhat/context-chef workflow release.yml.

After merge

Release workflow runs on main with no pending changesets → pnpm changeset publish publishes the three .5 versions via OIDC, with provenance attestation.


Generated by Claude Code

Add id-token: write permission so GitHub Actions can mint short-lived
OIDC tokens for the job, and drop the long-lived NPM_TOKEN env. Each
package must have a Trusted Publisher configured on npm pointing to
MyPrototypeWhat/context-chef and workflow release.yml.

Fixes ERR_PNPM_OTP_NON_INTERACTIVE caused by 2FA "auth and writes"
requiring an OTP that CI cannot provide with a non-automation token.
@MyPrototypeWhat MyPrototypeWhat merged commit e35a9be into main May 28, 2026
2 checks 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.

2 participants