Publish via npm Trusted Publishing (OIDC) for provenance - #40
Merged
Conversation
The previous release wrote an npm token into .npmrc, so changeset publish authenticated by token and emitted no provenance despite NPM_CONFIG_PROVENANCE. Drop the token auth step and NODE_AUTH_TOKEN so publishing uses pure OIDC trusted publishing, which signs provenance automatically. Requires a Trusted Publisher to be configured on npmjs.org for each package (GitHub Actions / kin0992/dev-toolkit / release.yml). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
@kin0992 packages are public on npmjs and consumed as workspace:* deps, so pnpm install needs no registry auth. setup-node only consumes NODE_AUTH_TOKEN when given a registry-url (it isn't), so the env had no effect. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Publishing uses npm Trusted Publishing (OIDC); no registry token is consumed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Drop the now-unused npm-scope/registry-url inputs from the reusable release workflow and the npm-scope passed by release.yml. Remove the Pulumi-managed NPM_TOKEN Actions secret (and its config value) since publishing no longer uses a registry token. Rewrite the CONSUMING.md release section for npm Trusted Publishing (OIDC), including the per-package trusted-publisher setup. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
🍹
|
kin0992
added a commit
that referenced
this pull request
Jun 1, 2026
## What Adds a `patch` changeset for all four publishable packages: - `@kin0992/oxc-config` - `@kin0992/skills` - `@kin0992/tsconfig` - `@kin0992/vitest-config` No functional changes — this exists to cut a fresh release so the next publish attaches **signed provenance** (npm Trusted Publishing / OIDC), which the current versions lack. ## Release flow Merging this PR triggers the release workflow, which opens a "Version Packages" PR bumping each package by a patch. Merging **that** PR publishes to npmjs.org with provenance. ##⚠️ Prerequisite Trusted Publishing must already be configured on npmjs.org for each of the four packages (GitHub Actions → `kin0992/dev-toolkit` → `release.yml`), and PR #40 must be merged first — otherwise the publish step fails auth. Provenance attaches on this publish; existing versions can't be back-filled. 🤖 Generated with [Claude Code](https://claude.com/claude-code) 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.
Problem
Published packages (e.g.
@kin0992/oxc-config@0.3.0) have no provenance — the registry's attestation endpoint returnsNot foundand the #37 release log never printed a "Signed provenance statement".Root cause, from the release log:
Configure npm scope authstep wrote the npm token into.npmrc, sochangeset publishauthenticated by token.changeset publishdid not produce provenance under that path, despiteNPM_CONFIG_PROVENANCE: trueandpublishConfig.provenance: true.OIDC is available - using npm trusted publishing, but the on-disk token overrode it.Change
Switch to pure npm Trusted Publishing (OIDC):
Configure npm scope authstep (no token on disk).NODE_AUTH_TOKENfrom the publish env.id-token: writeandNPM_CONFIG_PROVENANCE.npm then exchanges the workflow's id-token for a short-lived credential and signs provenance automatically.
Required manual step before merging / next release
A Trusted Publisher must be configured on npmjs.org for each package, or the next publish will fail auth:
Provenance attaches on the next version bump; existing
0.3.0can't be back-filled.npm_tokensecret /registry-urlinput are left declared (marked deprecated) for backward compatibility with any other callers.🤖 Generated with Claude Code