From 411ff0989bbd729d70fa06c3a0f4315a2d4ae135 Mon Sep 17 00:00:00 2001 From: Moti Zilberman Date: Thu, 23 Apr 2026 16:16:05 +0100 Subject: [PATCH] Skip Hermes nightly override on stable branches The test-ios-rntester, test-ios-helloworld actions and the test_android_helloworld job unconditionally run use-hermes-nightly.js, which replaces the pinned Hermes version with the latest nightly from npm. On stable/release branches this is wrong: the pinned version from version.properties should be used instead. Add a `use-hermes-nightly` input (default true for backward compat) to both composite actions, and guard the nightly override steps behind it. In test-all.yml, pass `!endsWith(github.ref_name, '-stable')` so that pushes to *-stable branches use the pinned Hermes version. --- .github/actions/test-ios-helloworld/action.yml | 6 ++++++ .github/actions/test-ios-rntester/action.yml | 6 ++++++ .github/workflows/test-all.yml | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/.github/actions/test-ios-helloworld/action.yml b/.github/actions/test-ios-helloworld/action.yml index 98bcc860f27..5064d118492 100644 --- a/.github/actions/test-ios-helloworld/action.yml +++ b/.github/actions/test-ios-helloworld/action.yml @@ -10,6 +10,10 @@ inputs: flavor: description: The flavor of the build. Must be one of "Debug", "Release". default: Debug + use-hermes-nightly: + description: Whether to override pinned Hermes versions with the latest nightly + required: false + default: 'true' runs: using: composite steps: @@ -26,10 +30,12 @@ runs: with: ruby-version: ${{ inputs.ruby-version }} - name: Set nightly Hermes versions + if: ${{ inputs.use-hermes-nightly == 'true' }} shell: bash run: | node ./scripts/releases/use-hermes-nightly.js - name: Run yarn install again, with the correct hermes version + if: ${{ inputs.use-hermes-nightly == 'true' }} uses: ./.github/actions/yarn-install - name: Download ReactNativeDependencies uses: actions/download-artifact@v4 diff --git a/.github/actions/test-ios-rntester/action.yml b/.github/actions/test-ios-rntester/action.yml index d014e428699..28654a14cc3 100644 --- a/.github/actions/test-ios-rntester/action.yml +++ b/.github/actions/test-ios-rntester/action.yml @@ -17,6 +17,10 @@ inputs: description: Whether we want to run E2E tests or not required: false default: false + use-hermes-nightly: + description: Whether to override pinned Hermes versions with the latest nightly + required: false + default: 'true' runs: using: composite @@ -34,10 +38,12 @@ runs: with: ruby-version: ${{ inputs.ruby-version }} - name: Set nightly Hermes versions + if: ${{ inputs.use-hermes-nightly == 'true' }} shell: bash run: | node ./scripts/releases/use-hermes-nightly.js - name: Run yarn install again, with the correct hermes version + if: ${{ inputs.use-hermes-nightly == 'true' }} uses: ./.github/actions/yarn-install - name: Prepare IOS Tests if: ${{ inputs.run-unit-tests == 'true' }} diff --git a/.github/workflows/test-all.yml b/.github/workflows/test-all.yml index fe25dcb5ac7..177a352016b 100644 --- a/.github/workflows/test-all.yml +++ b/.github/workflows/test-all.yml @@ -57,6 +57,7 @@ jobs: with: ruby-version: "3.2.0" flavor: Debug + use-hermes-nightly: ${{ !endsWith(github.ref_name, '-stable') }} test_ios_rntester: runs-on: macos-15-large @@ -76,6 +77,7 @@ jobs: with: use-frameworks: ${{ matrix.frameworks }} flavor: ${{ matrix.flavor }} + use-hermes-nightly: ${{ !endsWith(github.ref_name, '-stable') }} test_e2e_ios_rntester: runs-on: macos-15-large @@ -397,10 +399,12 @@ jobs: - name: Run yarn install uses: ./.github/actions/yarn-install - name: Set nightly Hermes versions + if: ${{ !endsWith(github.ref_name, '-stable') }} shell: bash run: | node ./scripts/releases/use-hermes-nightly.js - name: Run yarn install again, with the correct hermes version + if: ${{ !endsWith(github.ref_name, '-stable') }} uses: ./.github/actions/yarn-install - name: Prepare the Helloworld application shell: bash @@ -434,6 +438,7 @@ jobs: with: ruby-version: 3.2.0 flavor: Debug + use-hermes-nightly: ${{ !endsWith(github.ref_name, '-stable') }} test_ios_helloworld: runs-on: macos-15 @@ -456,6 +461,7 @@ jobs: with: flavor: ${{ matrix.flavor }} use-frameworks: ${{ matrix.use_frameworks }} + use-hermes-nightly: ${{ !endsWith(github.ref_name, '-stable') }} test_js: runs-on: ubuntu-latest