sdg(phase-11): switch npm releases to trusted publishing (OIDC) - #4
Merged
Conversation
Publishing now authenticates via npm Trusted Publishing: the Release job upgrades to npm >= 11.5.1 (Node 22 bundles npm 10, which cannot do the OIDC exchange) and npm publish trades the workflow's GitHub Actions OIDC token for short-lived publish credentials — no long-lived secret. The NPM_TOKEN secret is demoted to a bootstrap-only fallback, honored automatically only while the OIDC exchange is unavailable; missing credentials fail the run loudly with setup instructions, never a silent skip. Trigger, green-CI gate, strictly increasing versioning, and vX.Y.Z tagging are unchanged. DEVOPS.md records the new standing credential model and the one-time bootstrap (local tokenless publish preferred, CI-with-token alternative), superseding the token-secret model. Developer ruling 2026-07-28; covered by the standing npm authorization (same artifact, same trigger — only the credential mechanism changes). Co-Authored-By: Claude Fable 5 <[email protected]>
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.
Release/devops work under specs/DEVOPS.md authority (Developer ruling 2026-07-28: tokenless OIDC is the desired end state; covered by the standing npm authorization — same artifact, same trigger, only the credential mechanism changes).
What changes
.github/workflows/release.yml— publishing now authenticates via npm Trusted Publishing: the job upgrades npm to>= 11.5.1(Node 22 bundles npm 10, which cannot do the OIDC exchange, with a hard version assert), andnpm publish --provenancetrades the workflow's GitHub Actions OIDC token for short-lived publish credentials.NODE_AUTH_TOKEN/registry-urlwiring is gone. TheNPM_TOKENsecret is now a bootstrap-only fallback: when present it is written as an env-substituted~/.npmrcentry that npm reaches for only when the OIDC exchange is unavailable. Missing/broken credentials fail the publish step loudly with concrete setup instructions — a release is never silently skipped. Trigger (CI completion for amainpush), green-CI gate, checkout of the exact CI-validated commit, strictly increasing versioning vianext-version.mjs, andvX.Y.Ztagging are unchanged. Install and build still run on the stock CI-validated toolchain; the npm upgrade affects publishing only.specs/DEVOPS.md— records trusted publishing as the standing credential model (superseding the token-secret model recorded earlier the same day), the one-time bootstrap (preferred: local tokenless publish of 0.1.0, then configure the Trusted Publisher; alternative: CI publish with a temporaryNPM_TOKEN), and the updated failure-handling rule.sdg(liaison): update PHILOSOPHY.md) fromsdg/liaison-philosophy-oidc, which this branch is based on.Verification
run:block passesbash -n.>= 11.5.1(rejects 11.5.0, accepts 11.5.1) andnpm@^11.5.1resolves on the registry (currently 11.18.0).~/.npmrcline (\${NPM_TOKEN}env substitution) verified locally with the token env set.🤖 Generated with Claude Code