Repository navigation
ci(release): scope contents:write to the release job - #22
Merged
Merged
Conversation
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.
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. |
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.
Closes #2
The release workflow now defaults to
contents: read. Only thehostjob, which runsdist host --steps=upload --steps=releaseandgh release create, getscontents: write. The two build jobs no longer receiveGH_TOKEN.planandannouncekeep it with a read-only token.This is an edit to the cargo-dist template (allowed by
allow-dirty = ["ci"]).dist planstill passes locally. An independent review against the cargo-dist 0.32.0 source found nothing that needs write access or the token outsidehost.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.