Skip to content

Commit 5bf025e

Browse files
authored
Merge branch 'main' into rn-upgrade/0.81.5-no-unit-tests
2 parents 47f4757 + a492e34 commit 5bf025e

196 files changed

Lines changed: 5113 additions & 2993 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
##############################################################################################
2+
#
3+
# Auto RC OTA / build core (reusable)
4+
#
5+
# Shared logic for the Auto RC flow (build-rc-auto.yml): detect an OTA_VERSION bump and either
6+
# dispatch push-eas-update.yml, or fall through to build.yml.
7+
#
8+
# Runway's manual entry workflows no longer use this file — they call the dedicated OTA-only or
9+
# build-only workflows (runway-ota-*.yml, runway-*-builds.yml) directly. Kept here to preserve
10+
# automatic OTA-vs-build detection on every push to a release branch.
11+
#
12+
##############################################################################################
13+
name: Auto RC OTA Build Core
14+
15+
on:
16+
workflow_call:
17+
inputs:
18+
platform:
19+
description: 'Target platform passed to push-eas-update and build.yml (android or ios)'
20+
required: true
21+
type: string
22+
source_branch:
23+
description: >-
24+
Optional branch, tag, or SHA (Build workflow source_branch).
25+
Empty uses the branch selected in the caller workflow_dispatch "Use workflow from" UI.
26+
required: false
27+
type: string
28+
default: ''
29+
ota_channel:
30+
description: 'push-eas-update channel input (e.g. rc, production)'
31+
required: false
32+
type: string
33+
default: rc
34+
build_name:
35+
description: 'build.yml build_name (e.g. main-rc, main-prod)'
36+
required: false
37+
type: string
38+
default: main-rc
39+
create_production_ota_tag:
40+
description: 'If true, create OTA release tag after production trigger-ota (callers: *production* only)'
41+
required: false
42+
type: boolean
43+
default: false
44+
environment:
45+
description: 'Build environment / track passed to upload-to-testflight (e.g. rc, prod)'
46+
required: false
47+
type: string
48+
default: 'rc'
49+
skip_version_bump:
50+
description: >-
51+
If true, build.yml skips update-latest-build-version. Auto-RC callers set true since the
52+
bump is performed once upstream.
53+
required: false
54+
type: boolean
55+
default: false
56+
outputs:
57+
semantic_version:
58+
description: 'package.json version at the built commit (empty when OTA path taken)'
59+
value: ${{ jobs.trigger-build.outputs.semantic_version }}
60+
ios_version_code:
61+
description: 'iOS CURRENT_PROJECT_VERSION at the built commit (empty when OTA path taken)'
62+
value: ${{ jobs.trigger-build.outputs.ios_version_code }}
63+
android_version_code:
64+
description: 'Android versionCode at the built commit (empty when OTA path taken)'
65+
value: ${{ jobs.trigger-build.outputs.android_version_code }}
66+
67+
permissions:
68+
contents: write # required by build.yml (update-build-version job)
69+
pull-requests: read
70+
actions: write
71+
id-token: write # required by build.yml
72+
73+
jobs:
74+
resolve-context:
75+
name: Resolve OTA context
76+
uses: ./.github/workflows/runway-ota-resolve-context.yml
77+
with:
78+
source_branch: ${{ inputs.source_branch }}
79+
secrets: inherit
80+
81+
validate-ota-pr:
82+
name: Validate PR for OTA
83+
needs: resolve-context
84+
if: needs.resolve-context.outputs.ota_bump == 'true'
85+
runs-on: ubuntu-latest
86+
steps:
87+
- name: Validate PR number
88+
run: |
89+
if [[ -z "${{ needs.resolve-context.outputs.pr_number }}" ]]; then
90+
echo "::error::No PR found for this branch. OTA update requires a PR number."
91+
echo "::error::If you ran the workflow manually (workflow_dispatch), select your release branch in the 'Use workflow from' dropdown (e.g. release/7.71.0), not main."
92+
exit 1
93+
fi
94+
echo "Using PR #${{ needs.resolve-context.outputs.pr_number }}"
95+
96+
trigger-ota:
97+
name: Trigger OTA update
98+
needs: [resolve-context, validate-ota-pr]
99+
if: needs.resolve-context.outputs.ota_bump == 'true'
100+
uses: ./.github/workflows/push-eas-update.yml
101+
with:
102+
pr_number: ${{ needs.resolve-context.outputs.pr_number }}
103+
base_branch: ${{ needs.resolve-context.outputs.base_ref }}
104+
message: ${{ needs.resolve-context.outputs.ota_version }}
105+
channel: ${{ inputs.ota_channel }}
106+
platform: ${{ inputs.platform }}
107+
secrets: inherit
108+
109+
trigger-build:
110+
name: Trigger build mobile app
111+
needs: resolve-context
112+
if: needs.resolve-context.outputs.ota_bump != 'true'
113+
uses: ./.github/workflows/build.yml
114+
with:
115+
build_name: ${{ inputs.build_name }}
116+
platform: ${{ inputs.platform }}
117+
skip_version_bump: ${{ inputs.skip_version_bump }}
118+
source_branch: ${{ inputs.source_branch || github.ref_name }}
119+
upload_to_sentry: true
120+
secrets: inherit
121+
122+
create-ota-production-tag:
123+
name: Create OTA production release tag
124+
needs: [resolve-context, trigger-ota]
125+
if: ${{ inputs.create_production_ota_tag == true }}
126+
uses: ./.github/workflows/runway-create-ota-production-tag.yml
127+
with:
128+
tag_name: ${{ needs.resolve-context.outputs.ota_version }}
129+
checkout_ref: ${{ inputs.source_branch || github.ref_name }}
130+
secrets: inherit
131+
132+
upload-ios-testflight:
133+
name: Upload iOS to TestFlight
134+
needs: [trigger-build]
135+
if: ${{ inputs.platform == 'ios' }}
136+
uses: ./.github/workflows/upload-to-testflight.yml
137+
with:
138+
environment: ${{ inputs.environment }}
139+
source_branch: ${{ inputs.source_branch || github.ref_name }}
140+
build_branch: ${{ inputs.source_branch || github.ref_name }}
141+
build_name: ${{ inputs.build_name }}
142+
build_commit_sha: ${{ needs.trigger-build.outputs.built_commit_sha }}
143+
build_version: ${{ needs.trigger-build.outputs.semantic_version }}
144+
build_number: ${{ needs.trigger-build.outputs.ios_version_code }}
145+
secrets: inherit

.github/workflows/build-rc-auto.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# Bitrise "Rolling builds" / "Abort running builds" for one branch + one workflow).
99
#
1010
# Version bump runs once (update-latest-build-version.yml), then iOS and Android
11-
# builds are triggered in parallel via runway-ota-build-core.yml (skip_version_bump).
11+
# builds are triggered in parallel via auto-rc-ota-build-core.yml (skip_version_bump).
1212
#
1313
# The RC build comment includes an AI-generated test plan (inline with collapsible sections).
1414
#
@@ -104,7 +104,7 @@ jobs:
104104

105105
trigger-ios-rc-build:
106106
name: Trigger iOS RC Build
107-
uses: ./.github/workflows/runway-ota-build-core.yml
107+
uses: ./.github/workflows/auto-rc-ota-build-core.yml
108108
needs:
109109
- validate-and-find-pr
110110
- update_rc_build_version
@@ -117,7 +117,7 @@ jobs:
117117

118118
trigger-android-rc-build:
119119
name: Trigger Android RC Build
120-
uses: ./.github/workflows/runway-ota-build-core.yml
120+
uses: ./.github/workflows/auto-rc-ota-build-core.yml
121121
needs:
122122
- validate-and-find-pr
123123
- update_rc_build_version

.github/workflows/build.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ jobs:
117117
steps:
118118
- uses: actions/checkout@v4
119119
with:
120-
fetch-depth: 0
121120
ref: ${{ !inputs.skip_version_bump && needs.update-build-version.outputs.commit-hash || (inputs.source_branch || github.ref_name) }}
122121
- name: Setup Node.js
123122
uses: actions/setup-node@v4
@@ -316,6 +315,16 @@ jobs:
316315
SECRETS_JSON: ${{ toJSON(secrets) }}
317316
run: node scripts/validate-secrets-from-config.js
318317

318+
- name: Restore CocoaPods specs cache (iOS)
319+
if: matrix.platform == 'ios'
320+
uses: actions/cache@v4
321+
with:
322+
path: ~/.cocoapods/repos
323+
key: ${{ runner.os }}-cocoapods-specs-${{ hashFiles('ios/Podfile.lock') }}
324+
restore-keys: |
325+
${{ runner.os }}-cocoapods-specs-
326+
continue-on-error: true
327+
319328
# iOS: Install Pods here so generated paths match this runner (setup-node-modules skips pod install with --no-install-pods).
320329
- name: Install CocoaPods dependencies (iOS)
321330
if: matrix.platform == 'ios'
@@ -518,7 +527,6 @@ jobs:
518527
steps:
519528
- uses: actions/checkout@v4
520529
with:
521-
fetch-depth: 0
522530
ref: ${{ needs.prepare.outputs.checkout_ref_for_setup }}
523531

524532
- name: Setup Node.js

.github/workflows/runway-android-production-workflow.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

.github/workflows/runway-android-rc-workflow.yml

Lines changed: 0 additions & 50 deletions
This file was deleted.

.github/workflows/runway-ios-production-workflow.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.

.github/workflows/runway-ios-rc-workflow.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)