fix: use github.token for goreleaser to resolve 404 on release PATCH#1561
Merged
Conversation
The goreleaser workflow was failing with: PATCH .../releases/343427697: 404 Not Found Root cause: The GORELEASER_GITHUB_TOKEN lacks write permission to update releases in auth0/auth0-cli (GitHub returns 404 instead of 403 for security). This manifests when a release is pre-created before goreleaser runs. Fix: - Use github.token (has contents:write from workflow permissions) for goreleaser's GITHUB_TOKEN so it always has permission to create and update releases in auth0/auth0-cli - Add release.replace_existing_draft: true to .goreleaser.yml to handle stale draft releases from previous failed attempts The downstream homebrew/scoop steps use explicit token: parameters (not the GITHUB_TOKEN env var), so they are unaffected by this change.
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions job goreleaser
fix: use github.token for goreleaser to resolve 404 on release PATCH
Jun 23, 2026
ramya18101
approved these changes
Jun 23, 2026
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.
The goreleaser workflow was failing with
PATCH .../releases/343427697: 404 Not FoundbecauseGORELEASER_GITHUB_TOKENlacked write permission to update a release inauth0/auth0-clithat had been manually published before the workflow ran. GitHub returns 404 (not 403) when a token attempts an unauthorized write on a public repo.Changes
.github/workflows/release.yml— Switch goreleaser step fromGITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}toGITHUB_TOKEN: ${{ github.token }}. The workflow already declarespermissions: contents: write, so the built-in token is guaranteed to have release write access. Downstream homebrew/scoop steps use explicittoken:parameters and are unaffected..goreleaser.yml— Addrelease.replace_existing_draft: trueso goreleaser deletes and recreates any stale draft releases left by previous failed attempts rather than trying to PATCH them in place.