Skip to content

ci(release): push release tags with a github app token - #13028

Merged
iscekic merged 2 commits into
mainfrom
igor/release-app-token
Nov 27, 2026
Merged

iscekic merged 2 commits into
mainfrom
igor/release-app-token

Conversation

@iscekic

@iscekic iscekic commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

Why

GitHub now rejects the classic personal access token stored as KILO_APP_RELEASE_TOKEN ("Personal access tokens (classic) are forbidden from accessing this repository"). Every release tag push that uses it fails:

  • kilo-app-release.yml fails at "Mark the iOS upload", before the iOS and Android store submissions, so no store submissions run.
  • kilo-mcp-release.yml cannot tag, so no kilo-mcp GitHub release or changelog is produced, and each production deploy run is marked failed (the code itself deploys).
  • extension-store-release.yml will fail on its next run.

GITHUB_TOKEN cannot replace it: GitHub refuses a GITHUB_TOKEN tag push when the tagged commit's .github/workflows differs from every branch tip, so the token needs Workflows: write.

What changes

  • Each tag push mints a short-lived installation token for the org's existing kilo-maintainer GitHub App with actions/create-github-app-token (pinned by SHA), scoped to this repository with Contents: write and Workflows: write. The action revokes the token at the end of the job.
  • kilo-app-release.yml mints one token per push, because an installation token lasts an hour and the store submissions between the two pushes can take longer.
  • KILO_APP_RELEASE_TOKEN is no longer referenced.

Prerequisite

Repo Actions secret KILO_MAINTAINER_APP_SECRET (the kilo-maintainer private key, the same name kilocode uses). It is being added before merge. After the first successful release tag, the old classic token gets revoked and its secret deleted.

Verification

On a GCP VM: actionlint and shellcheck on the three workflows (no new findings), shellcheck on each changed push script, and the repository's workflow-wiring test suites (all pass). After merge, the failed kilo-mcp and kilo-app release runs are re-run to produce the missing tags and submissions.

GitHub now refuses the classic personal access token in KILO_APP_RELEASE_TOKEN for this repository. Each release tag push mints a kilo-maintainer installation token scoped to cloud with Contents: write and Workflows: write instead; GITHUB_TOKEN still cannot push a tag whose commit has workflow files that differ from every branch tip.
…ment

The kilo-maintainer key becomes a secret of the release environment, which admits only main. The iOS upload marker step revokes its token before eas submit runs, and the kilo-mcp and extension releases check for an existing tag first, so a rerun mints no token.

@rgbkrk rgbkrk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed all 3 workflows and verified Kilo-Org/cloud's release environment branch policy (branch:main only).

  • Replacing the classic KILO_APP_RELEASE_TOKEN PAT with short-lived kilo-maintainer (Iv23liaoCOSZgYYc58tR) installation tokens via SHA-pinned actions/create-github-app-token, scoped strictly to repositories: cloud, contents: write, and workflows: write, cleanly narrows the blast radius.
  • extension-store-release.yml and kilo-mcp-release.yml skip token minting when the tag already exists on reruns.
  • kilo-app-release.yml revokes the iOS marker token in an EXIT trap before eas submit runs and mints a fresh token for Tag release, so eas-cli never runs with a live workflows: write token.

@iscekic
iscekic added this pull request to the merge queue Nov 27, 2026
Merged via the queue into main with commit a039e3b Nov 27, 2026
45 checks passed
@iscekic
iscekic deleted the igor/release-app-token branch November 27, 2026 14:54
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.

2 participants