Skip to content

Reuse existing draft release in goreleaser#2855

Open
mikeland73 wants to merge 1 commit into
mainfrom
mikeland73/reuse-draft-release
Open

Reuse existing draft release in goreleaser#2855
mikeland73 wants to merge 1 commit into
mainfrom
mikeland73/reuse-draft-release

Conversation

@mikeland73
Copy link
Copy Markdown
Collaborator

What

Configure goreleaser to reuse an existing draft release on tag push instead of creating a new one.

On tag push, the release job in .github/workflows/cli-release.yml runs goreleaser release --clean. With only draft: true set, goreleaser would generate a fresh release body, which can clobber or duplicate a draft release that already exists for the tag.

Change

In .goreleaser.yaml's release: block:

  • mode: keep-existing — reuse an existing release for the tag and leave its description as-is (just attach the built artifacts). Creates one if none exists.
  • replace_existing_draft: false — explicitly avoid deleting-and-recreating an existing draft, preserving a hand-written description.

Note

GitHub's "get release by tag" API doesn't return drafts, so reuse depends on goreleaser's draft-aware lookup. Worth confirming on the next tag push that artifacts attach to the existing draft rather than spawning a second one.

🤖 Generated with Claude Code

Set mode: keep-existing and replace_existing_draft: false so that a tag
push reuses an existing draft release (preserving its description)
instead of creating a duplicate draft.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mikeland73 mikeland73 requested review from Lagoja and Copilot and removed request for Copilot June 7, 2026 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant