fix(release): authenticate release-please with PAT (enterprise blocks GITHUB_TOKEN PRs)#33
Conversation
…ase PR
This enterprise forbids the default GITHUB_TOKEN from creating pull requests, so
the release-please job failed at PR creation ("GitHub Actions is not permitted
to create or approve pull requests"). Pass PUBLISH_TOKEN (classic PAT, repo +
workflow scope) as release-please's token — a user PAT is not subject to that
Actions policy.
Signed-off-by: Sam Gammon <sam@elide.dev>
There was a problem hiding this comment.
Pull request overview
Updates the release workflow so release-please authenticates with a user PAT (PUBLISH_TOKEN) instead of GITHUB_TOKEN, working around an enterprise policy that blocks GitHub Actions from creating/approving pull requests. This keeps the existing automated release pipeline functional without introducing new secrets.
Changes:
- Pass
secrets.PUBLISH_TOKENasrelease-please-action’stokeninput so it can open the release PR under enterprise restrictions.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Merging this PR will not alter performance
|
The first
releaserun after merging #32 failed: the release-please job built the release branch but couldn't open the release PR —This is an enterprise policy (not a repo/org toggle we can flip; the repo setting returns a 409
The enterprise does not allow GitHub Actions to create or approve pull requests). The standard fix is to have release-please authenticate with a user PAT instead ofGITHUB_TOKEN— a PAT isn't subject to that Actions policy.This passes the existing
PUBLISH_TOKEN(classic PAT,repo+workflow) as release-please'stoken:. No new secret needed.Once merged, the
releaseworkflow re-runs onmainand release-please opens thev0.1.0release PR.Alternative (hardened, optional follow-up): a dedicated GitHub App token via
actions/create-github-app-tokeninstead of a classic PAT.