Skip to content

ci: authenticate release-please with GITHUB_TOKEN - #441

Merged
loonghao merged 1 commit into
mainfrom
fix/release-release-please-bad-credentials-breaking-a05acbd40751
Oct 11, 2026
Merged

loonghao merged 1 commit into
mainfrom
fix/release-release-please-bad-credentials-breaking-a05acbd40751

Conversation

@loonghao

@loonghao loonghao commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

The release-please step authenticated with:

token: ${{ secrets.RELEASE_PLEASE_TOKEN || secrets.PERSONAL_ACCESS_TOKEN }}

Neither secret works. RELEASE_PLEASE_TOKEN was never created in this repository, and PERSONAL_ACCESS_TOKEN was last rotated on 2021-05-29 and has since been revoked. Every run of the Release workflow has failed at this step with:

##[error]release-please failed: Bad credentials

The workflow has never succeeded once, so no release PR, tag, or GitHub Release has ever been produced, and the BREAKING CHANGE in 869c6a46 is still unpublished.

Change

.github/workflows/release.yml — authenticate the release-please step with secrets.GITHUB_TOKEN. It is always valid, and the job already declares the contents: write and pull-requests: write scopes that step needs.

Tradeoff: the release PR needs a manual approval

GitHub does fire pull_request workflows for a release PR opened with GITHUB_TOKEN, but their runs stop at "require approval" instead of executing: a user with write access has to approve them on the pull request page. The release PR therefore still reports Python package, Import Test and Version Consistency; it is not CI-less. What it lacks is automation, and main has no branch protection that would block a merge before those runs are approved.

The maintainer step is: when the chore: release vX.Y.Z PR opens, approve its pending runs and confirm they are green before merging it.

Making those runs start automatically needs a PAT or a GitHub App token. Neither is available here — RELEASE_PLEASE_TOKEN was never created and PERSONAL_ACCESS_TOKEN is revoked — and minting or rotating one is the repository owner's decision, not something this workflow can do.

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 869c6a4 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.
@loonghao
loonghao force-pushed the fix/release-release-please-bad-credentials-breaking-a05acbd40751 branch from c3f6f2c to 61c0031 Compare October 11, 2026 15:57
@loonghao loonghao changed the title ci: use GITHUB_TOKEN for release-please and validate the release PR ci: authenticate release-please with GITHUB_TOKEN Oct 11, 2026
@loonghao
loonghao merged commit 84e0747 into main Oct 11, 2026
9 checks passed
@loonghao
loonghao deleted the fix/release-release-please-bad-credentials-breaking-a05acbd40751 branch October 11, 2026 16:23
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