From ce1ed317c2e299e38f565c40d4fd81900fb6c866 Mon Sep 17 00:00:00 2001 From: Afonso Jorge Ramos Date: Wed, 29 Jul 2026 13:26:20 +0200 Subject: [PATCH 1/2] ci: defer release-please PR creation while a draft release is pending --- .github/workflows/release.yml | 30 +++++++++++++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3a68b5d0f..34b24bfe2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,9 +18,37 @@ jobs: release_created: ${{ steps.release.outputs.release_created }} tag_name: ${{ steps.release.outputs.tag_name }} steps: - - name: Run release-please + # Phase 1: create releases only. The release PR phase is deliberately + # skipped here because our releases start as drafts (electron-builder can + # only upload artifacts to a draft): a draft has no git tag yet, and a + # release-please PR pass that runs before the tag exists cannot find the + # just-released version, so it regenerates a bogus next-release PR from a + # months-old base (#3096, #3107). + - name: Run release-please (releases) id: release uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0 + with: + skip-github-pull-request: true + + # A pending draft means a release pipeline is in flight (or stuck): its + # tag does not exist yet, so the PR phase must wait. This also covers the + # draft the step above may have just created. + - name: Check for unpublished draft releases + id: drafts + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + REPO: ${{ github.repository }} + run: | + count=$(gh api "repos/${REPO}/releases?per_page=20" --jq '[.[] | select(.draft)] | length') + echo "count=${count}" >> "$GITHUB_OUTPUT" + + # Phase 2: create or refresh the next release PR, only when every + # release is published and its tag exists. + - name: Run release-please (release PR) + if: ${{ steps.drafts.outputs.count == '0' }} + uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0 + with: + skip-github-release: true lint: name: Lint App From 48184d1451fdecfff9fda0778d3a2b323ee5504c Mon Sep 17 00:00:00 2001 From: Afonso Jorge Ramos Date: Wed, 29 Jul 2026 13:29:03 +0200 Subject: [PATCH 2/2] ci: drop explanatory comments from release workflow --- .github/workflows/release.yml | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 34b24bfe2..53032b1e6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,21 +18,12 @@ jobs: release_created: ${{ steps.release.outputs.release_created }} tag_name: ${{ steps.release.outputs.tag_name }} steps: - # Phase 1: create releases only. The release PR phase is deliberately - # skipped here because our releases start as drafts (electron-builder can - # only upload artifacts to a draft): a draft has no git tag yet, and a - # release-please PR pass that runs before the tag exists cannot find the - # just-released version, so it regenerates a bogus next-release PR from a - # months-old base (#3096, #3107). - name: Run release-please (releases) id: release uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0 with: skip-github-pull-request: true - # A pending draft means a release pipeline is in flight (or stuck): its - # tag does not exist yet, so the PR phase must wait. This also covers the - # draft the step above may have just created. - name: Check for unpublished draft releases id: drafts env: @@ -42,8 +33,6 @@ jobs: count=$(gh api "repos/${REPO}/releases?per_page=20" --jq '[.[] | select(.draft)] | length') echo "count=${count}" >> "$GITHUB_OUTPUT" - # Phase 2: create or refresh the next release PR, only when every - # release is published and its tag exists. - name: Run release-please (release PR) if: ${{ steps.drafts.outputs.count == '0' }} uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0