Fix release matrix race that dropped the macOS DMG#16
Merged
Conversation
The three publish-tauri matrix jobs each ran tauri-action, which looks up the release by tag and creates it when absent. With no release present at the start, all three raced to create it: the first won and the others failed with a 422 already_exists, dropping their platform's assets. That is how v0.9.0 published with no macOS DMG and a latest.json missing the darwin targets. Add a create-release job that ensures the release exists before the matrix runs, so every publish-tauri job takes the find-existing-and-upload path instead of racing to create. The job is idempotent, so re-dispatching against an existing tag is a no-op. Immediate incremental publishing and the async-notarization flow are unchanged.
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.
Problem
v0.9.0 published with no macOS DMG and a
latest.jsonmissing everydarwintarget, so macOS download and auto-update were both broken until a manualmacos-onlyre-dispatch.Root cause: the three
publish-taurimatrix jobs (macOS/Windows/Linux) each runtauri-action, which looks up the release by tag and creates it when absent. With no release present at the start of a run, all three raced to create it - the first won, the losers failed with422 already_existsand dropped their platform's assets. macOS lost the race.This is latent: it can drop any platform on any release depending on timing.
Fix
Add a
create-releasejob that runs aftersetupand ensures the GitHub release exists before the matrix starts. Everypublish-taurijob then takes the "found existing release → upload" path (the same path themacos-onlyrecovery used successfully) instead of racing to create.gh release view || gh release create), so re-dispatching against an existing tag is a no-op.tauri-actionset before (Homebrew + curl instructions).Validation
python3 -c "yaml.safe_load(...)"parses;publish-tauri.needs == [setup, create-release].bash -nclean on thecreate-releasescript; generated notes output verified byte-for-byte against the previous body.secrets.GITHUB_TOKEN,github.repository,needs.setup.outputs.tag) match existing usage in the file.A workflow can only be fully exercised by cutting a release, so the real end-to-end proof is the next version tag. This change is behavior-preserving except for removing the create race.