chore: switch deploy to GitHub App token and gate recursive runs#681
Conversation
Replace deprecated tibdex/github-app-token with actions/create-github-app-token, pass the App token to actions/checkout so persisted credentials match the App identity on the main ruleset bypass list, and add a CI-skip marker to the semantic-release prepare-commit message so the App push does not retrigger this workflow. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sample app builds 📱Below you will find the list of the latest versions of the sample apps. It's recommended to always download the latest builds of the sample apps to accurately test the pull request. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #681 +/- ##
============================================
- Coverage 69.07% 68.00% -1.07%
- Complexity 838 848 +10
============================================
Files 149 155 +6
Lines 4601 4695 +94
Branches 628 641 +13
============================================
+ Hits 3178 3193 +15
- Misses 1189 1264 +75
- Partials 234 238 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
|
📏 SDK Binary Size Comparison ReportNo changes detected in SDK binary size ✅ |
|
Build available to test |
| "reports/sdk-binary-size.json" | ||
| ], | ||
| "message": "chore: prepare for ${nextRelease.version}\n\n${nextRelease.notes}" | ||
| "message": "chore: prepare for ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}" |
There was a problem hiding this comment.
Does this mean the build triggered on main during release won't include changes from this commit (e.g., the SDK version update), since CI would run on the previous commit instead of the latest one? Or did I misunderstood this?
Overview
Migrate the
Deploy SDKworkflow to authenticate with thecio-mobile-releaseGitHub App so it can be the sole bypass actor on a forthcomingmainruleset (replacing classic branch protection). Without these workflow changes, locking downmainwould reject semantic-release's prepare-commit and tag push withGH013.What changed
.github/workflows/deploy-sdk.ymltibdex/github-app-token@v2.1.0(Node 20 EOL) withactions/create-github-app-token@v3.1.1(SHA-pinned, Node 24).app-idinput toclient-id— needs a new repo secretCIO_APP_CLIENT_ID. ExistingCIO_APP_SECRET(PEM) is reused forprivate-key.with: token: ${{ steps.generate_token.outputs.token }}toactions/checkout. By default checkout persistsGITHUB_TOKEN(=github-actions[bot]) into local git config, and any latergit push(including the one inside@semantic-release/git) uses those credentials regardless of the env var passed to semantic-release. That's the most common cause ofGH013after wiring an App token..releaserc.json@semantic-release/gitcommit message template. App pushes don't get GitHub's recursion guard (which only suppressesGITHUB_TOKENpushes), so without this each release would spawn a redundant deploy run on the prepare-commit.Required pre-merge actions (repo admin)
CIO_APP_CLIENT_ID= the App's Client ID (theIv23li...string fromhttps://github.com/organizations/customerio/settings/apps/cio-mobile-release).cio-mobile-releaseApp is installed on this repo withContents: Read & write,Metadata: Read,Pull requests: Read & write, andWorkflows: Read & write(the last one is needed because release-prep commits may touch workflow files via assets).Required post-merge actions (repo admin)
main(andbetaif used):cio-mobile-releaseApp, mode = Always (not "For pull requests only" — that mode rejects directgit push).mainwith pushercio-mobile-release[bot].main(Settings -> Branches).CIO_APP_IDnumeric secret.Test plan
main.Deploy SDKworkflow generates an App token without warnings.cio-mobile-release[bot](notgithub-actions[bot]).Deploy SDKrun is queued for the prepare-commit (CI-skip directive applied).🤖 Generated with Claude Code
Note
Medium Risk
Changes release automation authentication and git push credentials, which can block tagging/releases if misconfigured (new secret required) or if token handling differs from previous action.
Overview
Updates the
Deploy SDKGitHub Actions workflow to authenticate via a GitHub App installation token and uses that token for bothactions/checkoutandsemantic-releasepushes, replacing the prior token action.Adjusts the
@semantic-release/gitprepare-commit message to include[skip ci]to prevent the release-prep commit from triggering a recursive deploy run.Reviewed by Cursor Bugbot for commit 104b072. Bugbot is set up for automated code reviews on this repo. Configure here.