From abb1e52b611e122e057fc975fb948c6d5ae89de1 Mon Sep 17 00:00:00 2001 From: Mike Landau Date: Sun, 7 Jun 2026 12:36:40 -0700 Subject: [PATCH 1/2] Reuse existing draft release in goreleaser 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) --- .goreleaser.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 3301a48bdc9..b6d2d29843e 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -40,6 +40,11 @@ checksum: release: prerelease: auto draft: true + # Reuse an existing draft release for this tag instead of creating a new one. + # `keep-existing` leaves the release (and its description) as is if one already + # exists, so a manually-written description is preserved. + mode: keep-existing + replace_existing_draft: false github: owner: jetify-com name: devbox From d08ce967833dcaeb8462667b04ec837d8abe4ca6 Mon Sep 17 00:00:00 2001 From: Mike Landau Date: Sun, 21 Jun 2026 10:49:09 -0700 Subject: [PATCH 2/2] Add use_existing_draft and replace_existing_artifacts to goreleaser Per PR review: use_existing_draft makes goreleaser find and attach to an existing draft release (the get-release-by-tag API doesn't return drafts), and replace_existing_artifacts lets re-runs on the same tag overwrite assets instead of failing with a 422. Co-Authored-By: Claude Opus 4.8 (1M context) --- .goreleaser.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.goreleaser.yaml b/.goreleaser.yaml index b6d2d29843e..27d9d816b60 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -45,6 +45,12 @@ release: # exists, so a manually-written description is preserved. mode: keep-existing replace_existing_draft: false + # GitHub's "get release by tag" API doesn't return drafts, so this is required + # for goreleaser to actually find and attach assets to the existing draft. + use_existing_draft: true + # Allow re-runs on the same tag to overwrite already-uploaded assets instead of + # failing with a 422 conflict. + replace_existing_artifacts: true github: owner: jetify-com name: devbox