From 58e0ab002bdbe7a54fa0011e35ccf12472728867 Mon Sep 17 00:00:00 2001 From: Josh Flayhart Date: Tue, 9 Jun 2026 22:37:12 -0500 Subject: [PATCH] ci: merge the release-please PR automatically main has no required checks and repo-level auto-merge is disabled, so gh pr merge --auto is unavailable here. Merge the release PR directly when release-please opens it, so a code merge to main flows straight through to a tag and publish without a second manual merge. --- .github/workflows/release-please.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 8c3c1d8..aea92a7 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -18,3 +18,16 @@ jobs: id: release with: token: ${{ secrets.RELEASE_PLEASE_TOKEN }} + + # Merge the release PR as soon as release-please opens/updates it, so a + # code merge to main flows straight through to a tag + publish without a + # second manual merge. main has no required checks and the repo has + # "Allow auto-merge" disabled, so `gh pr merge --auto` is unavailable + # ("clean status" error) — merge directly instead. Only squash is enabled. + # When this merge lands, release-please runs again and cuts the release. + - name: Merge the release PR + if: ${{ steps.release.outputs.pr }} + env: + GH_TOKEN: ${{ secrets.RELEASE_PLEASE_TOKEN }} + PR_NUMBER: ${{ fromJSON(steps.release.outputs.pr).number }} + run: gh pr merge "$PR_NUMBER" --squash