Skip to content

ci: publish via npm Trusted Publishing (OIDC) - #19

Merged
Suprhimp merged 1 commit into
masterfrom
ci-trusted-publishing
Jul 2, 2026
Merged

ci: publish via npm Trusted Publishing (OIDC)#19
Suprhimp merged 1 commit into
masterfrom
ci-trusted-publishing

Conversation

@Suprhimp

@Suprhimp Suprhimp commented Jul 2, 2026

Copy link
Copy Markdown
Member

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 classic NPM_TOKEN can't satisfy.

Fix

Switch the release workflow to npm Trusted Publishing (OIDC) — no token at all:

  • bump Node to 24 + upgrade npm to >= 11.5.1 (OIDC support)
  • drop NPM_TOKEN / NODE_AUTH_TOKEN from the changeset publish step
  • id-token: write permission is already present

Bonus: trusted publishing attaches build provenance automatically.

⚠️ Required manual step before this works

Configure a Trusted Publisher on npmjs.com (maintainer only):

npmjs.com → package @planningo/duulSettings → Trusted Publisher → GitHub Actions

  • Organization or user: Planningo
  • Repository: duul
  • Workflow filename: release.yml
  • Environment: (leave blank)

Once configured and this PR is merged, the push to master triggers 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

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>
@Suprhimp
Suprhimp merged commit 689b5a3 into master Jul 2, 2026
1 check passed
@Suprhimp
Suprhimp deleted the ci-trusted-publishing branch July 3, 2026 07:37
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