ci(build): convert build.yml to workflow_call-only and add Build Android wrapper#30270
Conversation
workflow_call inputs do not support `type: choice`, so this adds a
validate-inputs job to each workflow that enforces the same closed sets
the old workflow_dispatch expressed via choice menus:
- build.yml: platform ∈ {android, ios, both}, runner_provider ∈
{current, namespace}, build_name must be a key in builds.yml
- build-android.yml: environment ∈ {exp, beta, rc}
Also tightens input descriptions to document the allowed values and
the validate-inputs enforcement inline.
Co-authored-by: Cursor <cursoragent@cursor.com>
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Neither change touches: app source code, test files, E2E test infrastructure (tests/ directory), page objects, fixtures, or any component that would affect Detox test execution. These are build pipeline improvements that add input validation and a new Android build workflow. No E2E tests need to run to validate these changes. Performance Test Selection: |
|



Summary
build-android.yml(Build Android) workflow that mirrors the structure ofbuild-and-upload-to-testflight.ymlbut for Android APK/AAB: creates an ephemeral build branch, bumps the version viabuild.yml, builds the Android artifacts, and cleans up the branch. No upload step.validate-inputsguards to both workflows to enforce the same closed sets thatworkflow_dispatchpreviously expressed viatype: choice(sinceworkflow_callinputs do not supporttype: choice).Changes
build-android.yml(new)workflow_call+workflow_dispatchtriggerssource_branch(required, "Branch, tag, or SHA to build"),environment(exp/beta/rc),upload_to_sentry,runner_providerbuild_branch,built_commit_sha,semantic_version,android_version_codevalidate-inputs→prepare-build-branch(create-build-branch.yml) →build(build.yml, platform: android) →cleanup-build-branchUpload Android *steps insidebuild.yml; no new artifact handling needed in the wrapperCallers unaffected
All existing callers of
build.yml(nightly-build.yml,runway-rc-builds.yml,runway-production-builds.yml,expo-dev-build.yml,auto-rc-ota-build-core.yml,build-android-upload-to-browserstack.yml,build-ios-upload-to-browserstack.yml,build-and-upload-to-testflight.yml) continue to work unchanged — they all useworkflow_call.Manual testing
Build Androidworkflow manually from GitHub Actions UI with a valid branch andenvironment: rcvalidate-inputsfails fast with a clear error if an invalidenvironmentorbuild_nameis passed programmaticallyMade with Cursor
Note
Medium Risk
Changes CI workflow entrypoints and adds new runtime validation, which could break manual builds or callers if inputs/keys don’t match
builds.ymlor ifyqisn’t available on runners.Overview
Adds a new
Build Androidworkflow (build-android.yml) that can be manually triggered or called by other workflows to create an ephemeral build branch, run the existing reusablebuild.ymlfor Android (main-exp/beta/rc), and then delete the temporary branch.Updates
build.ymlto beworkflow_call-only by removing itsworkflow_dispatchtrigger and adding a fast-failvalidate-inputsjob that enforces allowedplatform/runner_providervalues and requiresbuild_nameto exist inbuilds.ymlbefore running version bump/build steps.Reviewed by Cursor Bugbot for commit 18b9790. Bugbot is set up for automated code reviews on this repo. Configure here.