mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Make build_android publish to the staging repositories (#45468)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/45468 This should greatly reduce the time spent on build_npm_package because we're moving all the publishing logic to build_android. I need to do a bit more testing with nightlies to make sure that everything is published correctly. Changelog: [Internal] [Changed] - Make build_android publish to the stating repositories Reviewed By: cipolleschi Differential Revision: D59804015 fbshipit-source-id: be3f0b6e16f5fdbf760ec7a5e16c8e258e06dd28
This commit is contained in:
committed by
Facebook GitHub Bot
parent
892c8352ca
commit
8d0cbbf0e6
@@ -25,17 +25,23 @@ runs:
|
||||
- name: Build and publish all the Android Artifacts to /tmp/maven-local
|
||||
shell: bash
|
||||
run: |
|
||||
# By default we only build ARM64 to save time/resources. For release/nightlies/prealpha, we override this value to build all archs.
|
||||
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"
|
||||
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"
|
||||
TASKS="publishAllToMavenTempLocal publishAndroidToSonatype build"
|
||||
else
|
||||
export ORG_GRADLE_PROJECT_reactNativeArchitectures="armeabi-v7a,arm64-v8a,x86,x86_64"
|
||||
# release: we want to build all archs (default)
|
||||
TASKS="publishAllToMavenTempLocal publishAndroidToSonatype build"
|
||||
fi
|
||||
./gradlew publishAllToMavenTempLocal build -PenableWarningsAsErrors=true
|
||||
./gradlew $TASKS -PenableWarningsAsErrors=true
|
||||
- name: Upload Maven Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: maven-local-build-android
|
||||
name: maven-local
|
||||
path: /tmp/maven-local
|
||||
- name: Upload test results
|
||||
if: ${{ always() }}
|
||||
|
||||
@@ -280,14 +280,6 @@ jobs:
|
||||
echo "GRADLE_OPTS = $GRADLE_OPTS"
|
||||
export ORG_GRADLE_PROJECT_reactNativeArchitectures="armeabi-v7a,arm64-v8a,x86,x86_64"
|
||||
node ./scripts/releases-ci/publish-npm.js -t nightly
|
||||
- name: Zip Maven Artifacts from /tmp/maven-local
|
||||
working-directory: /tmp
|
||||
run: zip -r maven-local.zip maven-local
|
||||
- name: Upload Maven Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: maven-local
|
||||
path: /tmp/maven-local.zip
|
||||
- name: Upload npm logs
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
||||
@@ -54,7 +54,6 @@ jobs:
|
||||
HERMES_VERSION: ${{ needs.prepare_hermes_workspace.output.HERMES_VERSION }}
|
||||
REACT_NATIVE_VERSION: ${{ needs.prepare_hermes_workspace.output.REACT_NATIVE_VERSION }}
|
||||
|
||||
|
||||
build_apple_slices_hermes:
|
||||
runs-on: macos-14
|
||||
needs: [build_hermesc_apple, prepare_hermes_workspace]
|
||||
@@ -286,14 +285,6 @@ jobs:
|
||||
echo "GRADLE_OPTS = $GRADLE_OPTS"
|
||||
export ORG_GRADLE_PROJECT_reactNativeArchitectures="armeabi-v7a,arm64-v8a,x86,x86_64"
|
||||
node ./scripts/releases-ci/publish-npm.js -t release
|
||||
- name: Zip Maven Artifacts from /tmp/maven-local
|
||||
working-directory: /tmp
|
||||
run: zip -r maven-local.zip maven-local
|
||||
- name: Upload Maven Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: maven-local
|
||||
path: /tmp/maven-local.zip
|
||||
- name: Upload npm logs
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
||||
@@ -212,7 +212,6 @@ jobs:
|
||||
HERMES_VERSION: ${{ needs.prepare_hermes_workspace.outputs.hermes-version }}
|
||||
REACT_NATIVE_VERSION: ${{ needs.prepare_hermes_workspace.outputs.react-native-version }}
|
||||
|
||||
|
||||
build_android:
|
||||
runs-on: 8-core-ubuntu
|
||||
needs: [set_release_type]
|
||||
@@ -366,14 +365,6 @@ jobs:
|
||||
export ORG_GRADLE_PROJECT_reactNativeArchitectures="armeabi-v7a,arm64-v8a,x86,x86_64"
|
||||
fi
|
||||
node ./scripts/releases-ci/publish-npm.js -t ${{ needs.set_release_type.outputs.RELEASE_TYPE }}
|
||||
- name: Zip Maven Artifacts from /tmp/maven-local
|
||||
working-directory: /tmp
|
||||
run: zip -r maven-local.zip maven-local
|
||||
- name: Upload Maven Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: maven-local
|
||||
path: /tmp/maven-local.zip
|
||||
- name: Upload npm logs
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user