From 8ae042d64901d01f8d79b32948389d35f2cda3da Mon Sep 17 00:00:00 2001 From: Fabrizio Cucci Date: Tue, 3 Mar 2026 12:46:01 +0000 Subject: [PATCH] Revert "Introduce 'Determine Hermes build flag' step" This reverts commit 111bd59db5ddeb2201de7f88fce14d2f4223432e. --- .github/actions/build-android/action.yml | 27 ++++++++---------------- 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/.github/actions/build-android/action.yml b/.github/actions/build-android/action.yml index 521f2ea8aa3..e1c4abe313e 100644 --- a/.github/actions/build-android/action.yml +++ b/.github/actions/build-android/action.yml @@ -31,23 +31,6 @@ runs: if: ${{ !endsWith(github.ref_name, '-stable') && !endsWith(github.base_ref || '', '-stable') || endsWith(github.ref_name, '-stable') && steps.read-rn-version.outputs.rn-version == '1000.0.0' }} shell: bash run: node ./scripts/releases/set-rn-artifacts-version.js --build-type ${{ inputs.release-type }} - - name: Determine Hermes build flag - id: hermes-flag - shell: bash - run: | - if [[ "${{ inputs.release-type }}" == "dry-run" ]]; then - # Use stable Hermes on stable branches, nightly Hermes on main - if [[ "${{ github.ref_name }}" == *"-stable" ]] || [[ "${{ github.base_ref }}" == *"-stable" ]]; then - echo "ORG_GRADLE_PROJECT_react.internal.useHermesStable=true" >> $GITHUB_ENV - else - echo "ORG_GRADLE_PROJECT_react.internal.useHermesNightly=true" >> $GITHUB_ENV - fi - elif [[ "${{ inputs.release-type }}" == "nightly" ]]; then - echo "ORG_GRADLE_PROJECT_react.internal.useHermesNightly=true" >> $GITHUB_ENV - else - # release - echo "ORG_GRADLE_PROJECT_react.internal.useHermesStable=true" >> $GITHUB_ENV - fi - name: Setup gradle uses: ./.github/actions/setup-gradle with: @@ -71,16 +54,24 @@ runs: if [[ "${{ inputs.release-type }}" == "dry-run" ]]; then # dry-run: we only build ARM64 to save time/resources. For release/nightlies the default is to build all archs. export ORG_GRADLE_PROJECT_reactNativeArchitectures="arm64-v8a,x86" # x86 is required for E2E testing + # Use stable Hermes on stable branches, nightly Hermes on main + if [[ "${{ github.ref_name }}" == *"-stable" ]] || [[ "${{ github.base_ref }}" == *"-stable" ]]; then + export HERMES_PREBUILT_FLAG="ORG_GRADLE_PROJECT_react.internal.useHermesStable=true" + else + export HERMES_PREBUILT_FLAG="ORG_GRADLE_PROJECT_react.internal.useHermesNightly=true" + fi TASKS="publishAllToMavenTempLocal build" elif [[ "${{ inputs.release-type }}" == "nightly" ]]; then # nightly: we set isSnapshot to true so artifacts are sent to the right repository on Maven Central. export ORG_GRADLE_PROJECT_isSnapshot="true" + export HERMES_PREBUILT_FLAG="ORG_GRADLE_PROJECT_react.internal.useHermesNightly=true" TASKS="publishAllToMavenTempLocal publishAndroidToSonatype build" else # release: we want to build all archs (default) + export HERMES_PREBUILT_FLAG="ORG_GRADLE_PROJECT_react.internal.useHermesStable=true" TASKS="publishAllToMavenTempLocal publishAndroidToSonatype build" fi - ./gradlew $TASKS -PenableWarningsAsErrors=true + env "$HERMES_PREBUILT_FLAG" ./gradlew $TASKS -PenableWarningsAsErrors=true - name: Save Android ccache if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }} uses: actions/cache/save@v5