Repository navigation
Conversation
The Release workflow published dunstan with NODE_AUTH_TOKEN from the NPM_TOKEN secret. It now publishes through npm trusted publishing, as @cejel/cejel's publish-npm.yml does: npm exchanges the job's OIDC token (id-token: write, already granted for the MCP registry login) for a short-lived credential, so no long-lived npm token is needed. - Require npm 11.5.1 before the publish: trusted publishing needs 11.5.1 or later, and Node 22 bundles npm 10. - Remove setup-node's _authToken placeholder before the publish, and assert it is gone: left in place, npm uses it instead of the OIDC exchange. - The publish step keeps its name, its NPM_PUBLISHED guard and --provenance --access public. - release-versions.test.ts pins the shape: no NPM_TOKEN or NODE_AUTH_TOKEN, id-token: write, environment release, and the npm and placeholder steps before the publish. It fails against the previous workflow. Needs, on npmjs.com, a trusted publisher on the dunstan package for BargLabs/dunstan, workflow release.yml, environment release, before the next v* tag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Superseded by the same change in the development repository, which was merged; it reaches this repository with the next release export. Closing this duplicate. |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
dunstan's Release workflow now publishes to npm through npm trusted publishing (OIDC) instead of a long-lived npm token. It's the same pattern
@cejel/cejeluses in production (publish-npm.yml).What changes in
release.ymlNODE_AUTH_TOKENfromsecrets.NPM_TOKEN. npm exchanges the job's OIDC token for a short-lived publish credential. The job already hasid-token: write(formcp-publisher login github-oidc) andenvironment: release._authTokenplaceholder is removed before the publish, and its absence is asserted. Left in place, npm uses it instead of the OIDC exchange.NPM_PUBLISHEDre-run guard,--provenance --access public, the 15-minute serve wait, the MCP registry step and the GitHub release job.src/__tests__/release-versions.test.tsgains one test pinning that shape: noNPM_TOKENorNODE_AUTH_TOKEN,id-token: write,environment: release, and both new steps before the publish. Against the previous workflow it fails (expected … not to match /NPM_TOKEN|NODE_AUTH_TOKEN:/).Before merging: set up the trusted publisher on npm
On npmjs.com, at dunstan → Settings → Trusted Publisher → GitHub Actions:
BargLabsdunstanrelease.ymlreleaseOrder
v*tag publishes through OIDC. Check that the version on npm shows "GitHub Actions" as its publisher, with a trusted publisher.NPM_TOKENsecret.If the token is deleted before step 3 succeeds, the next release cannot publish.
Checks run
scripts/preflight_fast.sh: Biome and typecheck pass.vitest run src/__tests__/release-versions.test.ts: 140 of 140 pass.v*tag or by dispatch, so the first real exercise is the next tag.🤖 Generated with Claude Code