From 64aece2ea1c4b21adab64807e1fbb9af1f4826a9 Mon Sep 17 00:00:00 2001 From: Francois Lopitaux Date: Mon, 19 Oct 2026 12:56:22 -0700 Subject: [PATCH] Create the draft release before electron-builder publishes Parallel artifact publishers each found no release for the tag and each created one, which split v1.8.0's assets across two drafts. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 94165e5..f0421fe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -37,6 +37,22 @@ jobs: CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} run: .github/scripts/setup-keychain.sh + # electron-builder caches its GitHub publisher only after an async create, + # so artifacts finishing together each get their own publisher, each finds + # no release for the tag, and each creates one — v1.8.0 ended up with its + # assets split across two drafts. With a draft already there, every + # publisher finds it and uploads into it. Skipped if a release for the tag + # exists, so re-running the job is safe. + - name: Create the draft release + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + if gh release view "$GITHUB_REF_NAME" > /dev/null 2>&1; then + echo "Release $GITHUB_REF_NAME already exists" + else + gh release create "$GITHUB_REF_NAME" --draft --verify-tag --title "${GITHUB_REF_NAME#v}" + fi + # CSC_LINK is deliberately not passed here: given it, electron-builder # re-imports the certificate into a keychain of its own and fails. - name: Build, sign, notarize and publish