release: fix GITHUB_TOKEN permissions so bundles actually attach - #7
Open
DenizSAHIN570 wants to merge 1 commit into
Open
DenizSAHIN570 wants to merge 1 commit into
DenizSAHIN570 wants to merge 1 commit into
Conversation
GITHUB_TOKEN defaults to read-only, so softprops/action-gh-release@v2's Attach to release step fails on every platform with "Resource not accessible by integration". Checked the last several releases on this repo (v0.1.0 through v0.2.1) - every one only has the macOS dmg attached, even though the Linux and Windows builds succeed in the same run. This scopes GITHUB_TOKEN to just what the workflow needs.
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.
Checked the release history — v0.1.0 through v0.2.1 all only have the macOS dmg attached, even though the workflow builds Linux and Windows too. Turns out
GITHUB_TOKENdefaults to read-only on this repo, so the "Attach to release" step fails silently on every platform withResource not accessible by integration. Only the dmg ever makes it on because that gets uploaded locally viascripts/publish-dmg.sh.Adds a scoped
permissions: contents: writetorelease.yml. Tested on my fork — tagged a release and all platforms (ubuntu, windows, macos) attached their bundles correctly this time.