From e20ec44d99c80185c1fa2c486786d47fcbce4106 Mon Sep 17 00:00:00 2001 From: jdpigeon Date: Thu, 1 Oct 2026 11:02:27 -0400 Subject: [PATCH] fix(release): create the draft once so platform jobs don't race into separate drafts --- .github/workflows/release.yml | 9 +++++++++ .llms/learnings.md | 12 ++++++++++++ 2 files changed, 21 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 124d012a..0ace352f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -50,6 +50,15 @@ jobs: - name: Lint run: npm run lint + # One draft for all three platforms. Without it every electron-builder + # job sees "release doesn't exist" at the same moment, each creates its own + # draft, and the assets split across them (v1.1.0 did this). + - name: Create the draft release + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TAG: ${{ github.event.inputs.tag }} + run: gh release view "$TAG" >/dev/null 2>&1 || gh release create "$TAG" --draft --verify-tag --title "${TAG#v}" + release: needs: verify runs-on: ${{ matrix.os }} diff --git a/.llms/learnings.md b/.llms/learnings.md index 36e235d9..86f5fe54 100644 --- a/.llms/learnings.md +++ b/.llms/learnings.md @@ -473,3 +473,15 @@ The running preview draws the participant screen at `zoom: 0.55` inside an `min-h-full` scroll column it fell back to content height, so the box grew and the page scrolled), and at the 800px column width an unzoomed screen is 550–750px tall. + +## Release builds race to create the GitHub release + +The three platform jobs in `release.yml` publish in parallel. When no release +exists at the tag, each electron-builder run logs `creating GitHub release +reason=release doesn't exist` at the same moment and creates its **own** draft, +so the assets split across two or three drafts with the same tag. Every job +still exits green. `gh release view ` shows only one of the drafts; list +them with `gh api repos/OWNER/REPO/releases --jq '.[] | select(.tag_name=="TAG")'`. +v1.1.0 hit this. The `verify` job now creates the draft once, before the +matrix starts, and electron-builder uploads into it (its `releaseType: draft` +matches).