Skip to content

Commit 7908607

Browse files
gabrieldonadelmeta-codesync[bot]
authored andcommitted
fix: iOS version mismatch when using nightly prebuilds (facebook#54370)
Summary: Setting `ENV['RCT_USE_PREBUILT_RNCORE'] = '1'` when running nightlies on iOS will result in the following error: <img height="608" alt="image" src="https://github.com/user-attachments/assets/130112d7-d4d8-4934-be56-c020a4b204a6" /> The reason for this happening is that we precompile the iOS artifacts on CI using whatever version is set on main (by default version 1000). This works fine when using RCs and stable versions because before the publishing step we do a release commit (e.g facebook@57ff544), which updates the react-native version. This can be easily mitigated by invoking the `set-rn-artifacts-version` CLI right before building the iOS prebuilds. ## Changelog: [IOS] [FIXED] - Fix iOS version mismatch when using nightly prebuilds Pull Request resolved: facebook#54370 Test Plan: Run `node ./scripts/releases/set-rn-artifacts-version.js --build-type` locally Reviewed By: javache Differential Revision: D86089144 Pulled By: cipolleschi fbshipit-source-id: a5c296ea8e022e562f7898803ab37dc61ffd67b6
1 parent 005d705 commit 7908607

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.github/workflows/nightly.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ jobs:
3030
uses: ./.github/workflows/prebuild-ios-core.yml
3131
with:
3232
use-hermes-nightly: true
33+
version-type: nightly
3334
secrets: inherit
3435
needs: [prebuild_apple_dependencies]
3536

.github/workflows/prebuild-ios-core.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1-
name: Prebuild iOS Dependencies
1+
name: Prebuild iOS Core
22

33
on:
44
workflow_call: # this directive allow us to call this workflow from other workflows
55
inputs:
6+
version-type:
7+
description: 'The version type to set for the prebuild (nightly or release)'
8+
type: string
9+
required: false
10+
default: ''
611
use-hermes-nightly:
712
description: 'Whether to use the hermes nightly build or read the version from the versions.properties file'
813
type: boolean
@@ -51,6 +56,12 @@ jobs:
5156
fi
5257
echo "Using Hermes version: $HERMES_VERSION"
5358
echo "HERMES_VERSION=$HERMES_VERSION" >> $GITHUB_ENV
59+
- name: Set React Native version
60+
shell: bash
61+
run: |
62+
if [ "${{ inputs.version-type }}" != "" ]; then
63+
node ./scripts/releases/set-rn-artifacts-version.js --build-type "${{ inputs.version-type }}"
64+
fi
5465
- name: Download ReactNativeDependencies
5566
uses: actions/download-artifact@v4
5667
with:

0 commit comments

Comments
 (0)