@devries-cameron20 / composio-1 / commits / 4abf06b23
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

ci: use GitHub App token for the release bot (replaces expired CI_BOT_TOKEN) (#3539)

## Problem The changeset release bot (`ts.release.yml` → `changesets/action`) authenticated with the **`CI_BOT_TOKEN`** personal access token. That PAT expired, so **every "TS SDK Release" run since 2026-06-04 failed** with: ``` HttpError: Bad credentials - https://docs.github.com/rest ``` `changeset version` ran fine, but the GitHub API call to create/update the "Release: update version" PR failed — so no version PR, no publish. (This is why 0.2.31 had to be shipped via a manual version bump in #3538.) ## Fix Mint a **short-lived GitHub App installation token** with [`actions/create-github-app-token`](https://github.com/actions/create-github-app-token) (pinned to `bcd2ba4` / v3.2.0) and use it for both `checkout` and the `changesets/action` step, instead of the PAT. Why an App token over a PAT or the default `GITHUB_TOKEN`: - **No silent expiry** — minted per run; nothing to rotate manually (exactly what just broke). - **Triggers downstream workflows** — the default `GITHUB_TOKEN` is blocked from triggering other workflows, so the version-PR merge would never kick off `build-cli-binaries.yml` to publish. App-token-created events *do* trigger them (same as a PAT, better hygiene). - **Not tied to a personal account.** (OIDC was considered but doesn't apply here — it authenticates to *external* services like cloud/npm trusted-publishing, not GitHub-internal PR/push operations.) ## Required setup before this lands Create a **GitHub App** (org-owned), installed on this repo, with repository permissions: - **Contents: Read & write** - **Pull requests: Read & write** Then add two repo secrets: - `RELEASE_BOT_APP_ID` — the App's ID - `RELEASE_BOT_APP_PRIVATE_KEY` — a generated private key (full PEM) Once those exist, the next push to `next` with pending changesets will regenerate the "Release: update version" PR correctly. `CI_BOT_TOKEN` can then be deleted. ## Out of scope / follow-up `docs.sync-connect-clients.yml` also uses `CI_BOT_TOKEN` (as `GH_TOKEN`). It can be migrated to the same App token in a follow-up; left untouched here to keep this focused on the release pipeline. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

Rahul Tarak committed Jun 9, 2026 at 02:23 UTC 4abf06b23f1a1a3ff4d299dc8a8a35f2a0b4eb46
1 file changed +15 -4
.github/workflows/ts.release.yml
+15 -4
@@ -5,18 +5,28 @@ on:
5 push:
6 branches: [next]
7
8 -env:
9 - GITHUB_ACCESS_TOKEN: ${{ secrets.CI_BOT_TOKEN }}
10 -
8 jobs:
9 release:
10 name: Release Typescript SDK
11 runs-on: ubuntu-latest
12 steps:
13 + # Mint a short-lived GitHub App installation token instead of a long-lived
14 + # PAT. App tokens don't expire out from under us (the old CI_BOT_TOKEN PAT
15 + # did), and — unlike the default GITHUB_TOKEN — events they create (the
16 + # "Release: update version" PR and its eventual merge) still trigger
17 + # downstream workflows like build-cli-binaries.yml, so publishing fires.
18 + - name: Generate GitHub App token
19 + id: app-token
20 + uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
21 + with:
22 + app-id: ${{ secrets.RELEASE_BOT_APP_ID }}
23 + private-key: ${{ secrets.RELEASE_BOT_APP_PRIVATE_KEY }}
24 +
25 - name: Checkout Code
26 uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
27 with:
28 fetch-depth: 0 # Required for git show HEAD^ when comparing published package versions
29 + token: ${{ steps.app-token.outputs.token }}
30
31 - name: Setup Node.js, pnpm, Bun
32 uses: ./.github/actions/setup-node-pnpm-bun
@@ -37,7 +47,8 @@ jobs:
47 uses: changesets/action@a45c4d594aa4e2c509dc14a9f2b3b67ba3780d0d # v1.9.0
48 if: github.event_name != 'workflow_dispatch' # only run on master merges
49 env:
40 - GITHUB_TOKEN: ${{ secrets.CI_BOT_TOKEN }}
50 + GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
51 + GITHUB_ACCESS_TOKEN: ${{ steps.app-token.outputs.token }}
52 with:
53 publish: pnpm changeset:release
54 commit: 'Release: update version'