Revert "Introduce 'Determine Hermes build flag' step"

This reverts commit 111bd59db5.
This commit is contained in:
Fabrizio Cucci committed 2026-03-03 12:46:01 +00:00
1 parent 111bd59db5
commit 8ae042d649
1 file changed
+9 -18
+9 -18
View File
@@ -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