Repository navigation
Description
What
[email protected] (used in .github/workflows/release.yml:114) creates duplicate release candidates when the workflow has a strategy.matrix with releaseDraft: true. Only one of the parallel jobs should win the draft-creation race; the others either error with 'Couldn't find release with tag v0.4.0. Creating one.' or push their assets to a never-published draft.
Symptom
The v0.4.0 release run (29737378047) produced TWO GitHub Releases both tagged v0.4.0:
id=356661754 name='SQLPilot v0.4.0' draft=True assets=17← full set, never publishedid=356495191 name='v0.4.0' draft=False assets=2← published, missing assets
Only one release can be the "Latest" on the GitHub release page. GitHub chose the partial one. Bazzite / Linux / macOS users on the partial release couldn't update at all.
Manual workaround
We deleted the broken Latest, published the Draft manually via the GitHub UI / gh api PATCH. Took ~5 minutes including discovery. Should be automatic.
Root cause
tauri-action v1.0.0 (vs older v0.x) introduced releaseDraft: true mode where each matrix job tries to:
- Look up the draft by tag
- If not found, create it
- Upload assets
With 4 parallel jobs racing on a fresh tag, all 4 step into step 1 simultaneously, all 4 miss the draft (it doesn't exist yet), all 4 race to create it, the first one wins, the other 3 hit GitHub's 'release already exists' path and either silently lose their assets or create a SECOND draft.
Workaround options (best → worst)
A. Single-job upload pattern (preferred)
Restructure the workflow so all 4 matrix jobs build + sign in parallel, but only ONE job uploads. Easiest: split into build (matrix) and upload (single ubuntu-latest runner, depends on build) jobs. The upload job downloads artifacts via actions/upload-artifact@v4 from each build job and uploads them to the release.
This trades tauri-action's all-in-one convenience for explicit two-phase build→upload. More lines but no race.
B. Lock via concurrency
Add concurrency: group: release-${{ github.ref_name }} cancel-in-progress: false to the release workflow. This serializes runs but doesn't help within a single run where 4 jobs hit the API in parallel.
C. Wait for upstream fix
Filed against tauri-apps/tauri-action (will need to look up the issue tracker). May be already reported.
Acceptance criteria
-
.github/workflows/release.ymlno longer produces duplicate release candidates when run withstrategy.matrix - Verifiable: push a test tag (e.g.
v0.4.0-rc.test), let the workflow run, confirm exactly ONE release exists for that tag with assets from all 4 platforms - The single fix path is documented in
docs/RELEASING.mdso future release cuts don't rediscover this
Out of scope
The exact tauri-action config that triggered this — not changing in this PR. We're fixing the workflow, not the action.
Activity
docs: add RELEASING.md with v0.4.0 release gotchas (#245)
fix(release): split build matrix + single upload job to fix race