Skip to content

ci: use Toolhive Release App token for release workflows#512

Merged
peppescg merged 1 commit into
mainfrom
ci/release-workflows-use-github-app
May 22, 2026
Merged

ci: use Toolhive Release App token for release workflows#512
peppescg merged 1 commit into
mainfrom
ci/release-workflows-use-github-app

Conversation

@peppescg
Copy link
Copy Markdown
Collaborator

Summary

  • Replaces the expired RELEASE_TOKEN PAT with short-lived tokens minted by the Toolhive Release App in both create-release-pr.yml and create-release-tag.yml
  • Uses actions/create-github-app-token@v3.2.0 with vars.RELEASE_APP_CLIENT_ID (3534099) + secrets.RELEASE_APP_PRIVATE_KEY
  • App tokens are minted per-run (1h TTL) and auto-renew — removes manual PAT rotation as a failure mode

Context

The latest release attempt failed with 401 Bad credentials when releaseo tried to create the release PR — the RELEASE_TOKEN PAT has expired. The Toolhive Release App is already installed on this repo with Read and write access to code, packages, and pull requests and its credentials are present in the repo secrets/variables; this PR just wires them in.

Failing run: https://github.com/stacklok/toolhive-cloud-ui/actions/runs/26281193602

Follow-up after merge

  • Trigger Create Release PR again to verify the App token flow works end-to-end
  • Once confirmed, the RELEASE_TOKEN repo secret can be deleted

Test plan

  • PR CI passes (lint, type-check, etc.)
  • After merge, run Create Release PR workflow with bump_type=patch and confirm the release PR is created (committer should be toolhive-release-app[bot])
  • Merge the release PR and verify Create Release Tag workflow creates the tag and GitHub Release

🤖 Generated with Claude Code

Replaces the expired RELEASE_TOKEN PAT with short-lived tokens minted by
the Toolhive Release App (RELEASE_APP_CLIENT_ID + RELEASE_APP_PRIVATE_KEY).
App tokens auto-renew per run, removing manual rotation as a failure mode.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 22, 2026 10:04
@github-actions github-actions Bot added the size/XS Extra small PR: < 100 lines changed label May 22, 2026
@peppescg peppescg self-assigned this May 22, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the release automation workflows to stop using an expired long-lived PAT and instead mint short-lived GitHub App installation tokens at runtime for creating release PRs and tags/releases.

Changes:

  • Add a “Generate GitHub App token” step to both release workflows.
  • Use the generated App token for actions/checkout, releaseo (release PR creation), and gh release create (release tagging workflow).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
.github/workflows/create-release-pr.yml Mint and use a GitHub App token for checkout and releaseo PR creation instead of RELEASE_TOKEN.
.github/workflows/create-release-tag.yml Mint and use a GitHub App token for checkout, tag push, and GitHub Release creation instead of RELEASE_TOKEN.

Comment thread .github/workflows/create-release-pr.yml
Comment thread .github/workflows/create-release-tag.yml
Comment thread .github/workflows/create-release-tag.yml
@peppescg peppescg merged commit b2ec9aa into main May 22, 2026
14 checks passed
@peppescg peppescg deleted the ci/release-workflows-use-github-app branch May 22, 2026 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Extra small PR: < 100 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants