From 6f3948fc48956f2d640f178546d4dd84de4a3f89 Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Wed, 18 Jun 2025 04:02:28 -0700 Subject: [PATCH] Publish, Close and Release the Maven repository during build_npm_package Summary: Due to us moving to central.sonatype.com for publishing, we cannot publish and release the Maven repository in 2 distinct invocations. This consolidates all the publishing job to happen during build_npm_package Changelog: [Internal] [Changed] - Reviewed By: fabriziocucci Differential Revision: D76888543 fbshipit-source-id: 3cb0db6176ed2221a12b4f3f1f575232aa006a6c --- .github/workflows/publish-release.yml | 22 ---------------------- scripts/releases/utils/release-utils.js | 2 +- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index 2b52c3494db..69cd912e57a 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -134,27 +134,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] - container: - image: reactnativecommunity/react-native-android:latest - env: - TERM: "dumb" - GRADLE_OPTS: "-Dorg.gradle.daemon=false" - ORG_GRADLE_PROJECT_SIGNING_PWD: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_PWD }} - ORG_GRADLE_PROJECT_SIGNING_KEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNING_KEY }} - ORG_GRADLE_PROJECT_SONATYPE_USERNAME: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPE_USERNAME }} - ORG_GRADLE_PROJECT_SONATYPE_PASSWORD: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPE_PASSWORD }} - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Build Android - uses: ./.github/actions/build-android - with: - release-type: ${{ needs.set_release_type.outputs.RELEASE_TYPE }} - gradle-cache-encryption-key: ${{ secrets.GRADLE_CACHE_ENCRYPTION_KEY }} - build_npm_package: runs-on: 8-core-ubuntu needs: @@ -164,7 +143,6 @@ jobs: build_hermes_macos, build_hermesc_linux, build_hermesc_windows, - build_android, prebuild_apple_dependencies, ] container: diff --git a/scripts/releases/utils/release-utils.js b/scripts/releases/utils/release-utils.js index 9a6b5af20fb..4c141e6958e 100644 --- a/scripts/releases/utils/release-utils.js +++ b/scripts/releases/utils/release-utils.js @@ -68,7 +68,7 @@ function publishAndroidArtifactsToMaven( // -------- For stable releases, we also need to close and release the staging repository. if ( exec( - './gradlew findSonatypeStagingRepository closeAndReleaseSonatypeStagingRepository', + './gradlew publishAndroidToSonatype closeAndReleaseSonatypeStagingRepository', ).code ) { echo(