Skip to content

ci(release): scope contents:write to the release job - #22

Merged
ElbertePlinio merged 1 commit into
mainfrom
ci/scope-release-permissions
Sep 25, 2026
Merged

ElbertePlinio merged 1 commit into
mainfrom
ci/scope-release-permissions

Conversation

@ElbertePlinio

Copy link
Copy Markdown
Member

Closes #2

The release workflow now defaults to contents: read. Only the host job, which runs dist host --steps=upload --steps=release and gh release create, gets contents: write. The two build jobs no longer receive GH_TOKEN. plan and announce keep it with a read-only token.

This is an edit to the cargo-dist template (allowed by allow-dirty = ["ci"]). dist plan still passes locally. An independent review against the cargo-dist 0.32.0 source found nothing that needs write access or the token outside host.

Not yet proven by a real tag run. The issue asks for a pre-release tag to confirm the upload still works; that is pending owner approval since it publishes a public prerelease.

Default the release workflow to contents: read, grant write only to the
host job that creates the GitHub Release, and drop GH_TOKEN from the
build jobs.
@ElbertePlinio

Copy link
Copy Markdown
Member Author

Tag test passed: v0.3.1-rc.1 (version bump on top of this branch, not merged) ran Release run 36170106280 with every job green. Host uploaded all 14 assets to the prerelease.

@ElbertePlinio
ElbertePlinio merged commit d9f892a into main Sep 25, 2026
8 checks passed
@ElbertePlinio
ElbertePlinio deleted the ci/scope-release-permissions branch September 25, 2026 17:58
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.

release.yml: scope contents:write to the release job

1 participant