From 61c00313a9feeb24e503e1d0c10df50ea899e00c Mon Sep 17 00:00:00 2001 From: loonghao Date: Sun, 11 Oct 2026 23:17:03 +0800 Subject: [PATCH] ci: authenticate release-please with GITHUB_TOKEN The release-please step authenticated with `secrets.RELEASE_PLEASE_TOKEN || secrets.PERSONAL_ACCESS_TOKEN`. Neither works: the first secret was never created, and the second was last rotated 2021-05-29 and is revoked. Every run of the Release workflow failed at this step with "Bad credentials", so no release PR, tag, or GitHub Release has ever been produced and the BREAKING CHANGE in 869c6a46 is still unpublished. Switch to `secrets.GITHUB_TOKEN`, which is always valid and already has the contents/pull-requests write scopes this job declares. Tradeoff, documented in the workflow: a PR created or updated by a workflow using GITHUB_TOKEN still creates `pull_request` runs, but they stop at "require approval" rather than executing. The release PR therefore still gets `Python package`, `Import Test` and `Version Consistency` runs; a user with write access has to approve them on the pull request page, and main has no branch protection forcing that before merge. Starting those runs automatically needs a PAT or GitHub App token, neither of which is available here and both of which are the repository owner's to mint. --- .github/workflows/release.yml | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5900b66b..b96e06ea 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -191,11 +191,30 @@ jobs: - uses: googleapis/release-please-action@v5 id: release with: - # A PAT is required: with GITHUB_TOKEN, GitHub does not fire - # pull_request workflows for the release PR, so it would carry no CI - # status, and the tag/release it creates cannot trigger other - # workflows either. - token: ${{ secrets.RELEASE_PLEASE_TOKEN || secrets.PERSONAL_ACCESS_TOKEN }} + # GITHUB_TOKEN, not a PAT: both RELEASE_PLEASE_TOKEN (never existed) + # and PERSONAL_ACCESS_TOKEN (last rotated 2021-05-29) are dead, and + # every run of this workflow failed with "Bad credentials" because of + # it. + # + # Known tradeoff, accepted deliberately. A PR created or updated by a + # workflow using GITHUB_TOKEN still creates `pull_request` runs, but + # they stop at "require approval" instead of running: a user with + # write access must approve them on the pull request page. So the + # release PR is not CI-less — `Python package`, `Import Test` and + # `Version Consistency` all report on it — but their runs wait for a + # human to approve them, and main has no branch protection that would + # block merging before that happens. + # + # Release step for maintainers: when the "chore: release vX.Y.Z" PR + # opens, approve its pending `pull_request` runs and confirm they are + # green before merging it. + # + # Making those runs start automatically instead requires a PAT or a + # GitHub App token (both are exempt from the approval rule). Neither + # is available here: RELEASE_PLEASE_TOKEN was never created and + # PERSONAL_ACCESS_TOKEN is revoked. Rotating or minting one is the + # repository owner's call, not something this workflow can do. + token: ${{ secrets.GITHUB_TOKEN }} config-file: release-please-config.json manifest-file: .release-please-manifest.json