From 2a57d5fcf54e4dc0517d508b48e9840db613913e Mon Sep 17 00:00:00 2001 From: Alan Date: Sat, 5 Sep 2026 20:24:57 -0400 Subject: [PATCH] fix: pre-create GitHub release to avoid electron-builder publish race The dmg and zip mac targets publish concurrently; when the release doesn't exist yet, both race to create it and one target's asset upload silently drops (v0.0.3 only got the zip's blockmap uploaded, the dmg never landed, breaking the Homebrew cask download). --- .github/workflows/release.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 114dc47..25a7a34 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -56,6 +56,17 @@ jobs: - name: Install dependencies run: yarn install --immutable + # electron-builder publishes the dmg and zip targets concurrently; if + # the release doesn't exist yet, both race to create it and one + # target's upload silently drops (seen on v0.0.3 — only the zip's + # blockmap made it, dmg never uploaded). Pre-creating it here makes + # electron-builder attach to an existing release instead of racing. + - name: Ensure GitHub release exists + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TAG: ${{ inputs.tag || github.ref_name }} + run: gh release view "$TAG" >/dev/null 2>&1 || gh release create "$TAG" --title "$TAG" --generate-notes + - name: Build, sign, notarize, and publish the DMG env: # Code-signing: a base64-encoded Developer ID Application .p12