Skip to content

fix(release): authenticate release-please with PAT (enterprise blocks GITHUB_TOKEN PRs)#33

Merged
Sam Gammon (sgammon) merged 1 commit into
mainfrom
fix/release-please-token
Jun 25, 2026
Merged

fix(release): authenticate release-please with PAT (enterprise blocks GITHUB_TOKEN PRs)#33
Sam Gammon (sgammon) merged 1 commit into
mainfrom
fix/release-please-token

Conversation

@sgammon

Copy link
Copy Markdown
Member

The first release run after merging #32 failed: the release-please job built the release branch but couldn't open the release PR —

GitHub Actions is not permitted to create or approve pull requests

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 of GITHUB_TOKEN — a PAT isn't subject to that Actions policy.

This passes the existing PUBLISH_TOKEN (classic PAT, repo+workflow) as release-please's token:. No new secret needed.

Once merged, the release workflow re-runs on main and release-please opens the v0.1.0 release PR.

Alternative (hardened, optional follow-up): a dedicated GitHub App token via actions/create-github-app-token instead of a classic PAT.

…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>
Copilot AI review requested due to automatic review settings June 25, 2026 02:25

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_TOKEN as release-please-action’s token input so it can open the release PR under enterprise restrictions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/release.yml
@codspeed-hq

codspeed-hq Bot commented Jun 25, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

✅ 9 untouched benchmarks


Comparing fix/release-please-token (cf08055) with main (ed992ce)

Open in CodSpeed

@sgammon Sam Gammon (sgammon) merged commit 0972f13 into main Jun 25, 2026
18 checks passed
@sgammon Sam Gammon (sgammon) deleted the fix/release-please-token branch June 25, 2026 02:29
This was referenced Jun 25, 2026
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.

3 participants