fix(ci): publish-npm permissions must not exceed the caller - #29
Merged
Conversation
The reusable publish-npm job requested contents:read, but cargo-dist's custom-publish-npm caller grants only {id-token, packages}, so contents is none. A reusable workflow cannot request more than its caller, which made the whole release workflow fail at startup. Drop contents:read and keep just id-token:write (a valid subset; checkout works at contents:none like publish-crates).
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.
The
v0.3.0release failed at startup (no jobs ran — nothing was published). Cause: the reusablepublish-npm.ymljob requestedpermissions: { id-token: write, contents: read }, but cargo-dist'scustom-publish-npmcaller grants only{ id-token: write, packages: write }. A reusable workflow can't request more than its caller, socontents: read(caller hascontents: none) invalidated the wholeReleaseworkflow.Fix: keep only
id-token: write(valid subset; OIDC needs just that;checkoutworks atcontents: none, same as thepublish-cratesjob).The PR's
Releaseplan check passing (no startup failure) confirms the chain is valid; thenv0.3.0gets re-tagged at the fixed commit.🤖 Generated with Claude Code