Skip to content

ci(build): convert build.yml to workflow_call-only and add Build Android wrapper#30270

Merged
tommasini merged 3 commits into
mainfrom
ci/build-android-action
May 15, 2026
Merged

ci(build): convert build.yml to workflow_call-only and add Build Android wrapper#30270
tommasini merged 3 commits into
mainfrom
ci/build-android-action

Conversation

@tommasini

@tommasini tommasini commented May 15, 2026

Copy link
Copy Markdown
Contributor

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-inputsprepare-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


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.

Reviewed by Cursor Bugbot for commit 18b9790. Bugbot is set up for automated code reviews on this repo. Configure here.

tommasini and others added 2 commits May 15, 2026 18:59
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>
@tommasini tommasini self-assigned this May 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

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.

@metamaskbotv2 metamaskbotv2 Bot added the team-mobile-platform Mobile Platform team label May 15, 2026
@github-project-automation github-project-automation Bot moved this to Needs dev review in PR review queue May 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: None (no tests recommended)
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 95%
click to see 🤖 AI reasoning details

E2E Test Selection:
The two changed files are purely CI/build infrastructure changes with no impact on application code or E2E test infrastructure:

  1. .github/workflows/build-android.yml (NEW FILE): A new reusable workflow that orchestrates Android-only builds. It creates a temp branch, bumps the version via build.yml, builds the Android APK/AAB, and cleans up the branch. This mirrors the iOS build-and-upload-to-testflight.yml pattern but for Android without the upload step. This is purely a CI pipeline addition.

  2. .github/workflows/build.yml (MODIFIED): Changes include:

    • Removing the workflow_dispatch trigger (manual dispatch removed from this workflow)
    • Adding a new validate-inputs job that enforces allowed values for build_name, platform, and runner_provider at runtime using shell case statements and yq to parse builds.yml
    • Adding descriptive comments to input parameters
    • Making update-build-version depend on the new validate-inputs job

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:
The changes are purely CI/build workflow modifications with no impact on app code, rendering, state management, or any component that could affect performance. No performance tests are warranted.

View GitHub Actions results

@tommasini tommasini marked this pull request as ready for review May 15, 2026 21:01
@tommasini tommasini requested a review from a team as a code owner May 15, 2026 21:01
@tommasini tommasini enabled auto-merge May 15, 2026 21:06

@Cal-L Cal-L left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@github-project-automation github-project-automation Bot moved this from Needs dev review to Review finalised - Ready to be merged in PR review queue May 15, 2026
@tommasini tommasini added the no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed label May 15, 2026
@sonarqubecloud

Copy link
Copy Markdown

@metamaskbotv2 metamaskbotv2 Bot added the INVALID-PR-TEMPLATE PR's body doesn't match template label May 15, 2026
@tommasini tommasini added this pull request to the merge queue May 15, 2026
Merged via the queue into main with commit b90a311 May 15, 2026
74 of 77 checks passed
@tommasini tommasini deleted the ci/build-android-action branch May 15, 2026 21:41
@github-actions github-actions Bot locked and limited conversation to collaborators May 15, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.79.0 Issue or pull request that will be included in release 7.79.0 label May 15, 2026
@tommasini tommasini restored the ci/build-android-action branch May 18, 2026 10:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

INVALID-PR-TEMPLATE PR's body doesn't match template no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed release-7.79.0 Issue or pull request that will be included in release 7.79.0 size-M team-mobile-platform Mobile Platform team

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants