From 4d9f0bda04ab6a83e1204c820afc4107fb48fb9b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 23 Jun 2026 11:25:48 +0000 Subject: [PATCH 1/2] Initial plan From d1d3180dadd8dc7318373f31c6a3c318f7fd7f06 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 23 Jun 2026 11:37:01 +0000 Subject: [PATCH 2/2] Fix goreleaser failure: use github.token and add replace_existing_draft 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. --- .github/workflows/release.yml | 2 +- .goreleaser.yml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eedef0197..ff329dc07 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,7 +31,7 @@ jobs: args: release --clean workdir: 'auth0-cli' env: - GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ github.token }} SENTRY_DSN: ${{ secrets.SENTRY_DSN }} # Homebrew Tap Process diff --git a/.goreleaser.yml b/.goreleaser.yml index b4be61334..8540cbbd6 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -32,6 +32,8 @@ snapshot: version_template: "{{ .Tag }}-SNAPSHOT-{{.ShortCommit}}" changelog: disable: true +release: + replace_existing_draft: true brews: - name: auth0 repository: