diff --git a/.github/workflows/release-please-beta.yml b/.github/workflows/release-please-beta.yml index 9e1187da..9bfbb6aa 100644 --- a/.github/workflows/release-please-beta.yml +++ b/.github/workflows/release-please-beta.yml @@ -51,8 +51,14 @@ jobs: fi pr=$(gh pr list --head release-please--branches--main --state open --json number --jq '.[0].number // empty') if [ -n "$pr" ]; then + # Approve as github-actions[bot] (GITHUB_TOKEN) — a different identity + # than the PR author (the PAT) — so it counts as a valid review. gh pr review "$pr" --approve --body "Automated approval — release-please version bump + changelog (#719)." || true - gh pr merge "$pr" --squash --auto || true + # Enable auto-merge as the PAT so the eventual merge commit is + # attributed to a real identity. If enabled via GITHUB_TOKEN the merge + # push is suppressed by recursion prevention and the follow-up run that + # cuts the tag/release never fires (#719). + GH_TOKEN="$RELEASE_PAT" gh pr merge "$pr" --squash --auto || true else echo "No open release PR to auto-merge." fi diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index eb33b723..91b977a4 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -44,8 +44,11 @@ jobs: fi pr=$(gh pr list --head release-please--branches--stable --state open --json number --jq '.[0].number // empty') if [ -n "$pr" ]; then + # Approve as github-actions[bot] (GITHUB_TOKEN, ≠ the PAT author) so it + # is a valid review; enable auto-merge as the PAT so the merge commit is + # attributed to a real identity and triggers the tag-cutting run (#719). gh pr review "$pr" --approve --body "Automated approval — release-please version bump + changelog (#719)." || true - gh pr merge "$pr" --squash --auto || true + GH_TOKEN="$RELEASE_PAT" gh pr merge "$pr" --squash --auto || true else echo "No open release PR to auto-merge." fi