Skip to content

feat(ci): use a GitHub App token for release-please (App -> PAT -> GITHUB_TOKEN)#83

Merged
pofallon merged 1 commit into
mainfrom
feat/release-please-github-app
Jul 25, 2026
Merged

feat(ci): use a GitHub App token for release-please (App -> PAT -> GITHUB_TOKEN)#83
pofallon merged 1 commit into
mainfrom
feat/release-please-github-app

Conversation

@pofallon

Copy link
Copy Markdown
Contributor

Summary

Switch release-please to author its release tag with a short-lived GitHub App installation token so the tag triggers release.yml (PyPI + Docker) — the best-hygiene alternative to a personal PAT for an org: auto-minted, nothing to rotate, tied to no human account, and reusable across org repos.

Token precedence in release-please.yml (each degrades gracefully to the next):

  1. GitHub App token (actions/create-github-app-token, gated on the RELEASE_PLEASE_APP_ID variable being set)
  2. RELEASE_PLEASE_TOKEN PAT
  3. GITHUB_TOKEN (release PRs still open; tag just won't auto-publish)

The App ID is stored as an Actions variable (not sensitive, and usable in if:); the private key is the RELEASE_PLEASE_APP_KEY secret.

Manual setup required (repo/org admin)

  1. Create a GitHub App (org-owned so it's reusable): Settings → Developer settings → GitHub Apps → New. Repository permissions: Contents: Read and write, Pull requests: Read and write. No webhook needed.
  2. Install it on get2knowio/remo (and any other repos later).
  3. Generate a private key for the App (downloads a .pem).
  4. Add to the repo (or org) → Settings → Secrets and variables → Actions:
    • Variable RELEASE_PLEASE_APP_ID = the App's numeric ID
    • Secret RELEASE_PLEASE_APP_KEY = the full contents of the .pem

Until those are set, release-please falls back to PAT/GITHUB_TOKEN (unchanged behavior).

Notes

  • actionlint clean.
  • Pin-me: actions/create-github-app-token@v2 and googleapis/release-please-action@v4 are floating tags (SHAs unresolvable offline) — pin to @<sha> to match repo convention.

🤖 Generated with Claude Code

…GITHUB_TOKEN)

Prefer a short-lived GitHub App installation token to author the release tag so
it triggers the tag-driven release.yml (PyPI + Docker) — like a PAT, unlike
GITHUB_TOKEN, but auto-minted, nothing to rotate, and tied to no personal
account (and reusable across org repos via org-level App secrets).

- release-please.yml: add an actions/create-github-app-token step gated on the
  `RELEASE_PLEASE_APP_ID` Actions *variable* (App IDs aren't sensitive and vars
  are usable in `if:`), with the private key in the `RELEASE_PLEASE_APP_KEY`
  secret. Token precedence: App token -> RELEASE_PLEASE_TOKEN PAT -> GITHUB_TOKEN.
  Degrades gracefully when the App isn't configured (step skipped).
- CONTRIBUTING.md: document the three-tier token resolution + App setup.

actionlint clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HAPB5GA4NVUgKFsVFVJDxN
@pofallon
pofallon merged commit 5eb6848 into main Jul 25, 2026
10 of 11 checks passed
@pofallon
pofallon deleted the feat/release-please-github-app branch July 25, 2026 01:20
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