From 80d52b513fa678ea5849d7395109354aa9c67f08 Mon Sep 17 00:00:00 2001 From: Filipe Moreira Date: Tue, 27 Oct 2026 17:52:11 -0300 Subject: [PATCH] fix(release): one draft release per tag, published by the notes job The 0.1.0-alpha run created two releases for the same tag: electron-builder uploads the x64 and arm64 builds in parallel and each created its own release when none existed, so the notes job failed with HTTP 422. The tag job now creates a draft that both uploads find; notes publishes it. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 13372f0..8e66464 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -78,6 +78,12 @@ jobs: git config user.email "bot@users.noreply.github.com" git tag -a "v${{ needs.decide.outputs.version }}" -m "JoyChromium ${{ needs.decide.outputs.version }}" git push origin "v${{ needs.decide.outputs.version }}" + # electron-builder uploads each architecture in parallel; with no release to find, each upload creates its own and + # the tag ends up with two. This draft is the one release they all upload to; `notes` publishes it. + - name: Create the draft release + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh release create "v${{ needs.decide.outputs.version }}" --draft --verify-tag --title "${{ needs.decide.outputs.version }}" --notes "" build: needs: [decide, tag] @@ -145,7 +151,7 @@ jobs: | node app/scripts/release-notes.mjs "${previous:-}" "${VERSION#v}" > notes.md # Alpha and other prerelease builds stay out of the installed app's latest update channel. if [ "$PRERELEASE" = "true" ]; then - gh release edit "$VERSION" --notes-file notes.md --prerelease --latest=false + gh release edit "$VERSION" --notes-file notes.md --draft=false --prerelease --latest=false else - gh release edit "$VERSION" --notes-file notes.md + gh release edit "$VERSION" --notes-file notes.md --draft=false fi