fix(release): enable npm trusted publishing (OIDC) on main to match stable branches#242
Open
cipolleschi wants to merge 1 commit into
Open
fix(release): enable npm trusted publishing (OIDC) on main to match stable branches#242cipolleschi wants to merge 1 commit into
cipolleschi wants to merge 1 commit into
Conversation
…anches Ports the working release setup from 0.87-stable so branches cut from main start correct: - add permissions: id-token: write (OIDC) + contents: write (push commit/tag) - bump actions/setup-node@v4.0.0 -> @v6 (older versions write a placeholder NODE_AUTH_TOKEN that defeats OIDC, causing E404/ENEEDAUTH) - package-manager-cache: false (avoid leaking the short-lived OIDC token) package.json already has the repository field (needed for provenance) via #241.
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.
Ports the release workflow fixes proven out on
0.87-stableso that future stable branches cut frommainpublish successfully via npm trusted publishing.What changed in
release.yamlpermissions: id-token: write(OIDC token exchange) +contents: write(push the bump commit/tag).actions/setup-node@v4.0.0→@v6. v4 predates OIDC support and writes a placeholderNODE_AUTH_TOKENthat makes npm attempt token auth (→E404/ENEEDAUTH) instead of OIDC.package-manager-cache: false(docs-recommended; avoids leaking the short-lived OIDC token via a poisoned cache).registry-urlandenvironment: npm-publishwere already present.package.jsonalready has therepositoryfield (required for provenance) via #241.This is the complete diff vs 0.87-stable
release.yamlwas the only difference betweenmainand0.87-stableacross all workflows + scripts;nightly.yaml,scripts/, and thepackage.jsonrepository field were already identical.release.yaml+ environmentnpm-publish(npm allows only one trusted publisher per package, so it must be re-pointed/created per release line).nightly.yamlstill publishes withNODE_AUTH_TOKEN: secrets.NPM_TOKEN— see PR discussion; needs a decision since npm allows only one trusted publisher per package.