Repository navigation
Let goreleaser append to an existing release instead of failing the race - #85
Merged
Merged
Conversation
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.
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.
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 samev*tag and the first two both want a GitHub Release.desktop-release.ymlalready documents the intent:In practice that assumption is backwards.
tauri-actioncreates the release within seconds when it does not find one, while goreleaser runsnpm ciplusmake precompileplus the builds first, roughly two minutes, before it publishes. So goreleaser is structurally the loser whenever timing is tight.On
v1.4.0both created a release object in the same second. Tauri published and claimed the tag, then goreleaser finished and died on: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-rc19survived the same structure by luck, which is why this had not surfaced before. It is intermittent, not new.Fix
Set
mode: appendon therelease:block so goreleaser uploads into whatever release already exists for the tag rather than trying to claim it. This makes reality match whatdesktop-release.ymlalready 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.ymlstill parses as valid YAMLv*tag produces one release containing both the desktop artifacts and the server binaries, with no draft left behind and no 422