Skip to content

Commit 8ae042d

Browse files
committed
Revert "Introduce 'Determine Hermes build flag' step"
This reverts commit 111bd59.
1 parent 111bd59 commit 8ae042d

1 file changed

Lines changed: 9 additions & 18 deletions

File tree

.github/actions/build-android/action.yml

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,6 @@ runs:
3131
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' }}
3232
shell: bash
3333
run: node ./scripts/releases/set-rn-artifacts-version.js --build-type ${{ inputs.release-type }}
34-
- name: Determine Hermes build flag
35-
id: hermes-flag
36-
shell: bash
37-
run: |
38-
if [[ "${{ inputs.release-type }}" == "dry-run" ]]; then
39-
# Use stable Hermes on stable branches, nightly Hermes on main
40-
if [[ "${{ github.ref_name }}" == *"-stable" ]] || [[ "${{ github.base_ref }}" == *"-stable" ]]; then
41-
echo "ORG_GRADLE_PROJECT_react.internal.useHermesStable=true" >> $GITHUB_ENV
42-
else
43-
echo "ORG_GRADLE_PROJECT_react.internal.useHermesNightly=true" >> $GITHUB_ENV
44-
fi
45-
elif [[ "${{ inputs.release-type }}" == "nightly" ]]; then
46-
echo "ORG_GRADLE_PROJECT_react.internal.useHermesNightly=true" >> $GITHUB_ENV
47-
else
48-
# release
49-
echo "ORG_GRADLE_PROJECT_react.internal.useHermesStable=true" >> $GITHUB_ENV
50-
fi
5134
- name: Setup gradle
5235
uses: ./.github/actions/setup-gradle
5336
with:
@@ -71,16 +54,24 @@ runs:
7154
if [[ "${{ inputs.release-type }}" == "dry-run" ]]; then
7255
# dry-run: we only build ARM64 to save time/resources. For release/nightlies the default is to build all archs.
7356
export ORG_GRADLE_PROJECT_reactNativeArchitectures="arm64-v8a,x86" # x86 is required for E2E testing
57+
# Use stable Hermes on stable branches, nightly Hermes on main
58+
if [[ "${{ github.ref_name }}" == *"-stable" ]] || [[ "${{ github.base_ref }}" == *"-stable" ]]; then
59+
export HERMES_PREBUILT_FLAG="ORG_GRADLE_PROJECT_react.internal.useHermesStable=true"
60+
else
61+
export HERMES_PREBUILT_FLAG="ORG_GRADLE_PROJECT_react.internal.useHermesNightly=true"
62+
fi
7463
TASKS="publishAllToMavenTempLocal build"
7564
elif [[ "${{ inputs.release-type }}" == "nightly" ]]; then
7665
# nightly: we set isSnapshot to true so artifacts are sent to the right repository on Maven Central.
7766
export ORG_GRADLE_PROJECT_isSnapshot="true"
67+
export HERMES_PREBUILT_FLAG="ORG_GRADLE_PROJECT_react.internal.useHermesNightly=true"
7868
TASKS="publishAllToMavenTempLocal publishAndroidToSonatype build"
7969
else
8070
# release: we want to build all archs (default)
71+
export HERMES_PREBUILT_FLAG="ORG_GRADLE_PROJECT_react.internal.useHermesStable=true"
8172
TASKS="publishAllToMavenTempLocal publishAndroidToSonatype build"
8273
fi
83-
./gradlew $TASKS -PenableWarningsAsErrors=true
74+
env "$HERMES_PREBUILT_FLAG" ./gradlew $TASKS -PenableWarningsAsErrors=true
8475
- name: Save Android ccache
8576
if: ${{ github.ref == 'refs/heads/main' || contains(github.ref, '-stable') }}
8677
uses: actions/cache/save@v5

0 commit comments

Comments
 (0)