Commit b90a311
ci(build): convert build.yml to workflow_call-only and add Build Android wrapper (#30270)
## Summary
- Adds a new `build-android.yml` (`Build Android`) workflow that mirrors
the structure of `build-and-upload-to-testflight.yml` but for Android
APK/AAB: creates an ephemeral build branch, bumps the version via
`build.yml`, builds the Android artifacts, and cleans up the branch. No
upload step.
- Adds runtime `validate-inputs` guards to both workflows to enforce the
same closed sets that `workflow_dispatch` previously expressed via
`type: choice` (since `workflow_call` inputs do not support `type:
choice`).
## Changes
### `build-android.yml` (new)
- `workflow_call` + `workflow_dispatch` triggers
- Inputs: `source_branch` (required, "Branch, tag, or SHA to build"),
`environment` (`exp`/`beta`/`rc`), `upload_to_sentry`, `runner_provider`
- Outputs: `build_branch`, `built_commit_sha`, `semantic_version`,
`android_version_code`
- Jobs: `validate-inputs` → `prepare-build-branch`
(create-build-branch.yml) → `build` (build.yml, platform: android) →
`cleanup-build-branch`
- APK/AAB artifacts are uploaded by the existing `Upload Android *`
steps inside `build.yml`; no new artifact handling needed in the wrapper
## Callers 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 use `workflow_call`.
## Manual testing
- [ ] Trigger `Build Android` workflow manually from GitHub Actions UI
with a valid branch and `environment: rc`
- [ ] Verify `validate-inputs` fails fast with a clear error if an
invalid `environment` or `build_name` is passed programmatically
Made with [Cursor](https://cursor.com)
<!-- CURSOR_SUMMARY -->
---
> [!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.yml` or if `yq` isn’t available on runners.
>
> **Overview**
> Adds a new `Build Android` workflow (`build-android.yml`) that can be
manually triggered or called by other workflows to create an ephemeral
build branch, run the existing reusable `build.yml` for Android
(`main-exp/beta/rc`), and then delete the temporary branch.
>
> Updates `build.yml` to be `workflow_call`-only by removing its
`workflow_dispatch` trigger and adding a fast-fail `validate-inputs` job
that enforces allowed `platform`/`runner_provider` values and requires
`build_name` to exist in `builds.yml` before running version bump/build
steps.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
18b9790. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 801ab3f commit b90a311
1 file changed
Lines changed: 128 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
0 commit comments