Skip to content

Fix release matrix race that dropped the macOS DMG#16

Merged
anbturki merged 1 commit into
mainfrom
fix/release-create-race
Jul 12, 2026
Merged

Fix release matrix race that dropped the macOS DMG#16
anbturki merged 1 commit into
mainfrom
fix/release-create-race

Conversation

@anbturki

Copy link
Copy Markdown
Owner

Problem

v0.9.0 published with no macOS DMG and a latest.json missing every darwin target, so macOS download and auto-update were both broken until a manual macos-only re-dispatch.

Root cause: the three publish-tauri matrix jobs (macOS/Windows/Linux) each run tauri-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 with 422 already_exists and 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-release job that runs after setup and ensures the GitHub release exists before the matrix starts. Every publish-tauri job then takes the "found existing release → upload" path (the same path the macos-only recovery used successfully) instead of racing to create.

  • Idempotent (gh release view || gh release create), so re-dispatching against an existing tag is a no-op.
  • Release notes are identical to what tauri-action set before (Homebrew + curl instructions).
  • Unchanged: immediate incremental publishing (assets appear per-platform as each finishes; macOS isn't blocked by Apple), the async notarization + staple flow, and the sidecar-verification steps.

Validation

  • python3 -c "yaml.safe_load(...)" parses; publish-tauri.needs == [setup, create-release].
  • bash -n clean on the create-release script; generated notes output verified byte-for-byte against the previous body.
  • All expressions (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.

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.
@anbturki anbturki merged commit f485396 into main Jul 12, 2026
3 checks passed
@anbturki anbturki deleted the fix/release-create-race branch July 12, 2026 13:45
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