Skip to content

feat(ci): dispatch Codemagic releases from GitHub Actions - #8

Merged
hyochan merged 1 commit into
mainfrom
feat/release-dispatch
Nov 19, 2026
Merged

hyochan merged 1 commit into
mainfrom
feat/release-dispatch

Conversation

@hyochan

@hyochan hyochan commented Nov 19, 2026

Copy link
Copy Markdown
Member

Summary

Releases can now be started from GitHub Actions alone, the same way Martie does it at f960d1c.

Release dispatch workflow (.github/workflows/release.yml)

workflow_dispatch with kind and message. It only tags a main commit whose CI passed. Codemagic's webhook does the rest.

kind tag Codemagic
store v<package.json version> + GitHub Release ios-production, android-production (TestFlight, Play internal draft)
ota annotated ota-<version>-<n> ota-production (Patch Production)
ota-dry annotated ota-dry-<version>-<n> the same run, without the upload

Example: gh workflow run Release -f kind=ota -f message="Fix the calendar total". Actions is usable here because the repo is public, so standard runners are free, and CI on main is green. When Actions cannot run, pushing the same tag by hand starts the identical Codemagic run.

Prebuild before the OTA release (scripts/ota-release.zsh)

  • For each platform, expo prebuild --no-install --clean now runs inside the production eas env:exec call, right before cmpatch release-react. Patch fingerprints the generated native projects. On a clean clone, cmpatch fingerprint fails with "no ios native project sources were found", so the first real OTA would have failed.
  • I compared fingerprints of production prebuilds with and without BOOKOO_BUILD_NUMBER. They are identical (iOS 5461…, Android fbc6…), so the store build number does not affect compatibility.
  • On Codemagic (CM_BUILD_ID), the script accepts a tag anywhere on main and runs CI's check commands itself. Main can move while the build queues. Locally, the exact-main and CI gates are unchanged.
  • OTA_DRY_RUN now runs the full build (prebuild, bundle, fingerprint) through release-react --dry-run and skips only the upload.
  • Commands are passed to env:exec as one quoted string per word.

codemagic.yaml: ota-production now checks the Patch login first and no longer runs its own tip-of-main step. The script owns that gate.

Verification

  • Local dry run in Codemagic mode (CM_BUILD_ID set, OTA_DRY_RUN=1) on a clean worktree of main with these files:
    • CI checks passed: 1751 tests.
    • iOS and Android each ran Finished prebuild → Computing native fingerprint... → Dry run complete.
    • Fingerprints: iOS 075fc227…, Android 001d2685….
  • bun check passes (1751 tests). bun lint:all reports 0 errors; the 22 warnings match main. actionlint is clean, zsh -n passes, and both YAML files parse.
  • New contract tests in test/release/otaRelease.test.ts cover the prebuild order, the dry-run flag, the Codemagic ancestry gate, and the Release tag formats.
  • After merge: an ota-dry dispatch, run end to end through Actions and Codemagic.

🤖 Generated with Claude Code

Add a workflow_dispatch Release workflow, as in Martie. On a main commit whose
CI passed it pushes the tag Codemagic builds from: v<version> plus a GitHub
Release for store builds, annotated ota-<version>-<n> for a Patch OTA, or
ota-dry-<version>-<n> for the same run without the upload. Pushing the tag by
hand still works when Actions cannot run.

scripts/ota-release.zsh now runs `expo prebuild --no-install --clean` for each
platform inside the production env:exec call, right before
`cmpatch release-react`. Patch fingerprints the generated native projects and a
clean clone has none, so the first real OTA would otherwise fail. On Codemagic
(CM_BUILD_ID) the script accepts a tag anywhere on main, since main may move
while the build queues, and runs CI's check commands itself. OTA_DRY_RUN now
builds the bundle and fingerprint with `release-react --dry-run` instead of
stopping after the gates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
bookoo-public Ready Ready Preview Nov 19, 2026 5:33am UTC

@hyochan hyochan added ✨ configuration Configuration for better code 🚀 cd Cloud Deploy labels Nov 19, 2026
@hyochan
hyochan merged commit 0341b45 into main Nov 19, 2026
6 checks passed
@hyochan
hyochan deleted the feat/release-dispatch branch November 19, 2026 05:40

This branch was successfully deployed

1 active deployment
Preview — 9b3e8e06 Deployed Nov 19, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🚀 cd Cloud Deploy ✨ configuration Configuration for better code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant