From 97cd9b6d063b7b09bb0762d04b13b0c2893b1417 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bern=C3=A1t=20G=C3=A1bor?= Date: Fri, 6 Nov 2026 08:25:26 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20ci:=20dry-run=20the=20release=20?= =?UTF-8?q?in=20the=20PR=20gate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Release preparation installs prek hooks under the seven-day cooldown, links fragments and builds the changelog; no pull request check did, so a change could merge green and fail the next release (simplint#55). The gate now calls the prepare workflow with dry-run, which assembles the release and skips the push. --- .github/workflows/check.yaml | 10 +++++++++- .github/workflows/prepare-release.yaml | 11 +++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 8637bc0..9308cba 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -63,10 +63,18 @@ jobs: run: tasks/old_target_check.sh 3.5 rejected - name: 🧪 Reject Python 2.7 run: tasks/old_target_check.sh 2.7 rejected + release: + name: 🏷️ Release dry run + uses: $/.github/workflows/prepare-release.yaml + permissions: + contents: read + pull-requests: read + with: + dry-run: true gate: name: 🚦 ${{ github.event_name == 'pull_request' && 'Required checks pass' || 'Non-PR checks pass' }} if: ${{ !cancelled() }} # codespell:ignore cancelled - needs: [test, old-target] + needs: [test, old-target, release] runs-on: ubuntu-26.04 permissions: {} steps: diff --git a/.github/workflows/prepare-release.yaml b/.github/workflows/prepare-release.yaml index ff82588..c85eb8d 100644 --- a/.github/workflows/prepare-release.yaml +++ b/.github/workflows/prepare-release.yaml @@ -8,16 +8,23 @@ on: type: choice options: [auto, major, minor, patch] default: auto + workflow_call: + inputs: + dry-run: + description: Assemble the release without pushing, for the pull request gate + type: boolean + required: true permissions: {} jobs: prepare: name: 🏷️ Prepare Towncrier release - uses: tox-dev/github-workflows/.github/workflows/prepare-towncrier-release.yaml@bceb5c005e19823dc8835f536f53f172ae223927 # 6.5.0 + uses: tox-dev/github-workflows/.github/workflows/prepare-towncrier-release.yaml@2a3b863f4563ce9891d2cee1ed381b6f82654836 # 6.6.0 permissions: contents: read pull-requests: read with: - bump: ${{ inputs.bump }} + bump: ${{ inputs.bump || 'auto' }} + dry-run: ${{ inputs.dry-run == true }} annotated: true secrets: RELEASE_APP_PRIVATE_KEY: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}