ci: use PAT (GH_TOKEN) for goreleaser releases from fork - #34
Closed
eeran-cs wants to merge 1 commit into
Closed
Conversation
GITHUB_TOKEN is scoped to the fork and cannot create releases in the upstream repository. Switch to a PAT stored as GH_TOKEN with repo scope, as recommended by the goreleaser documentation for fork publishing.
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.
Summary
GITHUB_TOKENto a PAT stored as theGH_TOKENrepository secretGITHUB_TOKENis scoped to the fork and cannot create releases in the upstream repository; a PAT withreposcope is required by goreleaser for fork publishingSetup required
A repository secret named
GH_TOKENmust be added to the fork with a PAT that has thereposcope. This allows goreleaser to upload compiled binaries as GitHub Release assets when av*.*.*tag is pushed.Test plan
GH_TOKENsecret in the fork with a PAT (reposcope)v0.1.0) to the fork'smainReleaseworkflow completes and release assets (binaries + checksums) appear on the GitHub Releases page