ci: publish via npm Trusted Publishing (OIDC) - #19
Merged
Conversation
Replace the NPM_TOKEN auth (blocked by npm's 2FA-for-publish policy, E403) with OIDC-based Trusted Publishing: - bump Node to 24 and upgrade npm to >= 11.5.1 (required for OIDC) - drop NPM_TOKEN / NODE_AUTH_TOKEN env from the changesets publish step Requires a Trusted Publisher configured on npmjs.com for Planningo/duul + release.yml. The id-token: write permission is already set. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The 1.1.0 release publish failed with E403 — npm now requires 2FA or a granular "bypass-2FA" token to publish
@planningo/duul, which the classicNPM_TOKENcan't satisfy.Fix
Switch the release workflow to npm Trusted Publishing (OIDC) — no token at all:
>= 11.5.1(OIDC support)NPM_TOKEN/NODE_AUTH_TOKENfrom thechangeset publishstepid-token: writepermission is already presentBonus: trusted publishing attaches build provenance automatically.
Configure a Trusted Publisher on npmjs.com (maintainer only):
npmjs.com→ package@planningo/duul→ Settings → Trusted Publisher → GitHub ActionsPlanningoduulrelease.ymlOnce configured and this PR is merged, the push to
mastertriggers the Release job which finds no changesets and publishes the pending 1.1.0 via OIDC (also creating the git tag + GitHub release).🤖 Generated with Claude Code