Skip to content

fix(release): split build matrix + single upload job (closes #242) - #251

Merged
EVWorth merged 1 commit into
mainfrom
fix/release-yml-race-condition-v2
Jul 22, 2026
Merged

EVWorth merged 1 commit into
mainfrom
fix/release-yml-race-condition-v2

Conversation

@EVWorth

@EVWorth EVWorth commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes the [email protected] race that produced duplicate GitHub Releases in the v0.4.0 run.

Before: All 4 build jobs in strategy.matrix ran tauri-action with releaseDraft: true. Each tried to look up the draft by tag, found nothing (it didn't exist yet), raced to create it, first one wins, the other 3 either created a SECOND draft or silently lost their assets. v0.4.0 shipped with one Draft (17 assets, never published) and one Latest (2 assets, partial, picked by GitHub).

After: build matrix runs tauri-action in build-only mode (omit tagName, releaseName, releaseId per the action's README) and uploads bundles + .sig via actions/upload-artifact@v7. A new single upload job (ubuntu-22.04) downloads all build artifacts, then softprops/action-gh-release@v2 creates the draft release ONCE and uploads every asset. No race because only one job touches the GitHub Releases API.

generate-update-manifest now needs: [upload] so gh release download runs after the release exists.

Changes

  • .github/workflows/release.yml:
    • Matrix gets artifact_suffix (linux-x86_64, windows-x86_64, macos-aarch64, macos-x86_64) so each upload has a unique name.
    • Build step: tauri-action without tagName.
    • New "Stage portable exe" step on Windows: copies sqlpilot.exe to SQLPilot.exe (public name preserved).
    • New "Upload build artifacts" step: pushes src-tauri/target/release/bundle/ + SQLPilot.exe per platform.
    • New upload job: downloads everything, then softprops/action-gh-release@v2 creates the draft + uploads all asset globs (fail_on_unmatched_files: true as a sanity check).
    • Manifest job: needs: [build] → needs: [upload].
  • docs/RELEASING.md: gotcha Fix: sidebar schema selection, explain tab, autocomplete, run/explain flow #1 marked FIXED. Recovery steps retained for historical reference. Checklist updated: now expects the upload job in the success set and an explicit "exactly one release, draft=true" check.

Acceptance criteria (per #242)

  • release.yml no longer produces duplicate release candidates with strategy.matrix
  • Verifiable: push a test tag (e.g. v0.4.0-rc.test) and confirm exactly ONE release for that tag with assets from all 4 platforms — recommend doing this on a throwaway branch before merging to main
  • The fix path is documented in docs/RELEASING.md (gotcha Fix: sidebar schema selection, explain tab, autocomplete, run/explain flow #1 marked FIXED, verification procedure spelled out)

Out of scope

Test plan

  1. Push test tag (e.g. v0.4.0-rc.test) on this branch.
  2. Watch the workflow: 4 builds → upload → generate-update-manifest.
  3. After run: gh api repos/EVWorth/sqlpilot/releases | jq '.[] | select(.tag_name == "v0.4.0-rc.test")' should show exactly one release, draft=true, with 17+ assets.
  4. Delete the test tag + draft (no garbage left behind).

Closes #242

[email protected] with releaseDraft + strategy.matrix races 4 jobs to
create the draft, producing duplicate releases (one Draft with all assets,
one published 'Latest' with only the Windows portable + latest.json). v0.4.0
shipped this way; Linux/macOS users got no auto-update.

Restructure: build matrix now builds only (tauri-action in build-only mode:
omit tagName/releaseName/releaseId) and uploads bundles + .sig via
actions/upload-artifact@v7. A new single ubuntu upload job downloads all
artifacts and creates the draft release ONCE via softprops/action-gh-release@v2.
generate-update-manifest now needs:[upload] so gh release download sees the
release.

Closes #242
@EVWorth
EVWorth force-pushed the fix/release-yml-race-condition-v2 branch from 800c176 to 6138039 Compare July 22, 2026 01:32
@EVWorth
EVWorth merged commit 5ca25fe into main Jul 22, 2026
10 checks passed
@EVWorth
EVWorth deleted the fix/release-yml-race-condition-v2 branch July 22, 2026 11:49
EVWorth added a commit that referenced this pull request Jul 23, 2026
Issue 243 asks to capture the createUpdaterArtifacts gotcha in RELEASING.md.
The gotcha already exists as gotcha #2 (PR #241 added the env var). What's
missing is the cross-link from .opencode/AGENTS.md and an update to the
example to reflect the renamed Build bundles (no release) step after #251.

- docs/RELEASING.md: rename step in gotcha #2 example from Build and publish
  to Build bundles (no release), trim the trailing '...'
- .opencode/AGENTS.md: add pitfall #13 referencing the gotcha, and a
  'read RELEASING.md gotchas 1-5' note in the Release Flow section

Closes #243
EVWorth added a commit that referenced this pull request Jul 23, 2026
Issue 243 asks to capture the createUpdaterArtifacts gotcha in RELEASING.md.
The gotcha already exists as gotcha #2 (PR #241 added the env var). What's
missing is the cross-link from .opencode/AGENTS.md and an update to the
example to reflect the renamed Build bundles (no release) step after #251.

- docs/RELEASING.md: rename step in gotcha #2 example from Build and publish
  to Build bundles (no release), trim the trailing '...'
- .opencode/AGENTS.md: add pitfall #13 referencing the gotcha, and a
  'read RELEASING.md gotchas 1-5' note in the Release Flow section

Closes #243
EVWorth added a commit that referenced this pull request Jul 23, 2026
…252)

Issue 243 asks to capture the createUpdaterArtifacts gotcha in RELEASING.md.
The gotcha already exists as gotcha #2 (PR #241 added the env var). What's
missing is the cross-link from .opencode/AGENTS.md and an update to the
example to reflect the renamed Build bundles (no release) step after #251.

- docs/RELEASING.md: rename step in gotcha #2 example from Build and publish
  to Build bundles (no release), trim the trailing '...'
- .opencode/AGENTS.md: add pitfall #13 referencing the gotcha, and a
  'read RELEASING.md gotchas 1-5' note in the Release Flow section

Closes #243
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.

chore: handle tauri-action v1.0.0 race condition in release.yml

1 participant