Skip to content

fix: use RELEASE_PLEASE_TOKEN so release PRs trigger CI - #285

Merged
kellenmurphy merged 2 commits into
mainfrom
fix/release-please-token
Aug 21, 2026
Merged

fix: use RELEASE_PLEASE_TOKEN so release PRs trigger CI#285
kellenmurphy merged 2 commits into
mainfrom
fix/release-please-token

Conversation

@kellenmurphy

Copy link
Copy Markdown
Owner

Passes RELEASE_PLEASE_TOKEN to googleapis/release-please-action instead of the built-in GITHUB_TOKEN.

Why

GitHub suppresses workflow-trigger events for anything created with GITHUB_TOKEN — an intentional infinite-loop guard. Release PRs opened under that token therefore fire no pull_request event, and CI never runs on them.

The evidence is visible in the run history: 0 of the last 100 workflow runs are on a release-please--* branch, while dependabot branches show 13, 13, 10, 7 and 7 runs each. Other bot PRs get CI; release PRs do not.

This also matters for the automerge step, which approves and auto-merges the release PR. Auto-merge waits on required checks, so a release PR that never triggers CI either blocks indefinitely or merges without having been tested.

Prerequisite

RELEASE_PLEASE_TOKEN is already configured as a repository secret (created 2026-05-16) and main already consumes it at line 29 as GH_TOKEN for the gh CLI steps. This change applies it to the action input as well — the half that was never landed.

Companion to the --repo "$GITHUB_REPOSITORY" flags already on main.

@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@kellenmurphy
kellenmurphy enabled auto-merge (squash) August 21, 2026 17:29
@kellenmurphy
kellenmurphy merged commit 0c8ed42 into main Aug 21, 2026
10 of 11 checks passed
@kellenmurphy
kellenmurphy deleted the fix/release-please-token branch August 21, 2026 17:29
kellenmurphy added a commit that referenced this pull request Aug 21, 2026
Reverts #285. Passing RELEASE_PLEASE_TOKEN to the action made the release
PR authored by the same account that the approve step runs as, so
`gh pr review --approve` failed with "Can not approve your own pull
request" and the step aborted before enabling auto-merge.

GITHUB_TOKEN on the action is deliberate: it makes the release PR authored
by the bot, leaving RELEASE_PLEASE_TOKEN a distinct identity that is
allowed to approve it. CI on the release PR is already triggered by the
trigger-ci label, which ci.yml picks up via its `labeled` event type, so
the token swap was not needed for that.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant