Skip to content

fix(ci): publish-npm permissions must not exceed the caller - #29

Merged
snowmead merged 1 commit into
mainfrom
fix-publish-npm-permissions
Jun 16, 2026
Merged

fix(ci): publish-npm permissions must not exceed the caller#29
snowmead merged 1 commit into
mainfrom
fix-publish-npm-permissions

Conversation

@snowmead

Copy link
Copy Markdown
Contributor

The v0.3.0 release failed at startup (no jobs ran — nothing was published). Cause: the reusable publish-npm.yml job requested permissions: { id-token: write, contents: read }, but cargo-dist's custom-publish-npm caller grants only { id-token: write, packages: write }. A reusable workflow can't request more than its caller, so contents: read (caller has contents: none) invalidated the whole Release workflow.

Fix: keep only id-token: write (valid subset; OIDC needs just that; checkout works at contents: none, same as the publish-crates job).

The PR's Release plan check passing (no startup failure) confirms the chain is valid; then v0.3.0 gets re-tagged at the fixed commit.

🤖 Generated with Claude Code

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).
@snowmead
snowmead merged commit 0a6ace0 into main Jun 16, 2026
12 checks passed
@snowmead
snowmead deleted the fix-publish-npm-permissions branch June 16, 2026 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant