ci: extract ephemeral build branch into reusable workflow and refactor nightly builds#28120
ci: extract ephemeral build branch into reusable workflow and refactor nightly builds#28120
Conversation
|
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. |
|
✅ E2E Fixture Validation — Schema is up to date |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
None of these changes affect:
These are purely build/release pipeline improvements. Running E2E tests would provide zero validation value for these changes. Performance Test Selection: |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
| - name: Display TestFlight upload summary | ||
| run: | | ||
| BUILD_VERSION=$(node -p "require('./package.json').version") | ||
| BUILD_NUMBER=$(node -p "require('./package.json').version.split('.').pop()") |
There was a problem hiding this comment.
Build number extracted from wrong file, always wrong
Medium Severity
BUILD_NUMBER is extracted from package.json version (7.73.0) via .split('.').pop(), which always yields the semver patch number (e.g. 0), not the actual build number. The real build number (e.g. 4138) is written by set-build-version.sh into bitrise.yml, build.gradle, and project.pbxproj — but never into package.json. The summary table will display a misleading value for testers.
|





Description
The nightly build workflow relied on a persistent
chore/temp-nightlybranch (synced daily bynightly-temp-branch-sync.yml) and duplicated the TestFlight upload logic that already existed inupload-to-testflight.yml. Meanwhile,upload-to-testflight.ymlcouldn't push version-bump commits to protected branches likemain.This PR:
create-build-branch.ymlworkflow that createsbuild/<source>-<timestamp>branches on demandupload-to-testflight.ymlcallable by adding aworkflow_calltrigger alongsideworkflow_dispatch, so other workflows (like nightly) can reuse the full build+upload pipelinenightly-build.ymlto run on acronschedule (4 AM UTC) instead of push-triggered, callingupload-to-testflight.ymlfor iOS exp/rc andcreate-build-branch.yml+build.ymlfor Android exp/rcWith these changes,
nightly-temp-branch-sync.ymlandscripts/create-temp-nightly-branch.shcan be retired in a follow-up.Changelog
CHANGELOG entry: null
Related issues
Fixes:
Manual testing steps
N/A — CI workflow changes only. Verify by:
source_branch: mainand confirming the ephemeral branch is created, build succeeds, and branch is cleaned upworkflow_dispatchand confirming both iOS (via upload-to-testflight) and Android (via build.yml) streams completeScreenshots/Recordings
Before
N/A
After
N/A
Pre-merge author checklist
Pre-merge reviewer checklist
Made with Cursor
Note
Medium Risk
Medium risk because it refactors GitHub Actions build/release automation (branch creation, version bumps, and TestFlight uploads), where small misconfigurations can break nightly delivery or leave stray branches behind.
Overview
Nightly build automation is reworked to avoid pushing version-bump commits to protected branches and to reduce duplicated CI logic. A new reusable workflow
create-build-branch.ymlcreatesbuild/<source>-<timestamp>branches on demand and is used by both iOS and Android build pipelines.nightly-build.ymlis converted from a push-driven temp-branch approach to a 4 AM UTC scheduled workflow, running iOS exp/rc via the reusableupload-to-testflight.ymlpipeline and Android exp/rc viacreate-build-branch.yml+build.yml, with explicit cleanup of Android ephemeral branches.upload-to-testflight.ymlis made callable (workflow_call), now builds from an ephemeral branch and cleans it up afterward, and its step summary now includes the computed build number.CODEOWNERSis updated to include the new workflow.Written by Cursor Bugbot for commit f546ead. This will update automatically on new commits. Configure here.