Skip to content

Let goreleaser append to an existing release instead of failing the race - #85

Merged
jay739 merged 1 commit into
mainfrom
ci/goreleaser-append-mode
Sep 22, 2026
Merged

jay739 merged 1 commit into
mainfrom
ci/goreleaser-append-mode

Conversation

@jay739

@jay739 jay739 commented Sep 22, 2026

Copy link
Copy Markdown
Owner

Fixes the failure mode that hit v1.4.0.

What happened

All three tag-triggered workflows (release.yml, desktop-release.yml, docker-publish.yml) fire on the same v* tag and the first two both want a GitHub Release. desktop-release.yml already documents the intent:

# Reuse the GitHub Release created by the other release workflows
# (release.yml + docker-publish.yml) instead of creating our own.

In practice that assumption is backwards. tauri-action creates the release within seconds when it does not find one, while goreleaser runs npm ci plus make precompile plus the builds first, roughly two minutes, before it publishes. So goreleaser is structurally the loser whenever timing is tight.

On v1.4.0 both created a release object in the same second. Tauri published and claimed the tag, then goreleaser finished and died on:

scm releases: failed to publish artifacts: could not update existing release:
PATCH .../releases/392689336: 422 Validation Failed
[{Resource:Release Field:tag_name Code:already_exists}]

The build itself was completely fine. Every binary, archive, package and checksum was produced and uploaded; they were just stranded in a draft that could never be published, so the release went out with desktop installers only until the server binaries were moved across by hand.

v1.4.0-rc19 survived the same structure by luck, which is why this had not surfaced before. It is intermittent, not new.

Fix

Set mode: append on the release: block so goreleaser uploads into whatever release already exists for the tag rather than trying to claim it. This makes reality match what desktop-release.yml already assumes.

Deliberately not done: serialising the workflows or merging them into one. That would be a bigger restructure, and append is sufficient because all three genuinely do want to publish into a single shared release.

Test plan

  • .goreleaser.yml still parses as valid YAML
  • Next v* tag produces one release containing both the desktop artifacts and the server binaries, with no draft left behind and no 422

All three tag-triggered workflows publish into one shared GitHub Release, but
desktop-release.yml (tauri-action) creates it within seconds while goreleaser
builds for roughly two minutes first, so goreleaser reliably loses that race
whenever timing is tight. With no mode set it tried to claim the tag and failed
with 422 already_exists, which is what happened on v1.4.0: the desktop
artifacts published fine and the server binaries were stranded in an
unpublishable draft that had to be moved across by hand.

mode: append makes goreleaser upload into the existing release instead, which
is what desktop-release.yml already assumes is happening.
@jay739
jay739 merged commit 1e6750f into main Sep 22, 2026
7 checks passed
@jay739
jay739 deleted the ci/goreleaser-append-mode branch September 22, 2026 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

⌂ 换网址