diff --git a/.github/workflows/buildAndroid.yml b/.github/workflows/buildAndroid.yml index 8bdba2f7e5f3..81305fe28dec 100644 --- a/.github/workflows/buildAndroid.yml +++ b/.github/workflows/buildAndroid.yml @@ -122,6 +122,11 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e + - name: Block compromised Java certificates + uses: Expensify/GitHub-Actions/block-compromised-java-certificates@b70c378d6cfae84f6844379eef3568cb33ea9680 + with: + restrict-gradle: 'true' + - name: Setup 1Password CLI and certificates uses: Expensify/GitHub-Actions/setup-certificate-1p@main with: diff --git a/.github/workflows/publishReactNativeAndroidArtifacts.yml b/.github/workflows/publishReactNativeAndroidArtifacts.yml index 8048abe07e4d..c46436a7155a 100644 --- a/.github/workflows/publishReactNativeAndroidArtifacts.yml +++ b/.github/workflows/publishReactNativeAndroidArtifacts.yml @@ -83,6 +83,11 @@ jobs: - name: Setup Gradle uses: gradle/actions/setup-gradle@50e97c2cd7a37755bbfafc9c5b7cafaece252f6e + - name: Block compromised Java certificates + uses: Expensify/GitHub-Actions/block-compromised-java-certificates@b70c378d6cfae84f6844379eef3568cb33ea9680 + with: + restrict-gradle: 'true' + - name: Determine new patched RN version id: getNewPatchedVersion run: echo "NEW_PATCHED_VERSION=$(./.github/scripts/getNewPatchedRNVersion.sh)" >> "$GITHUB_OUTPUT" diff --git a/.github/workflows/publishReactNativeiOSArtifacts.yml b/.github/workflows/publishReactNativeiOSArtifacts.yml index 56aebc1d2322..38e119cc680b 100644 --- a/.github/workflows/publishReactNativeiOSArtifacts.yml +++ b/.github/workflows/publishReactNativeiOSArtifacts.yml @@ -234,6 +234,22 @@ jobs: path: /tmp/ios-artifacts merge-multiple: true + - name: Get Java version + id: get-java-version + uses: ./.github/actions/composite/getJavaVersion + + - name: Setup Java + # v5.2.0 + uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 + with: + distribution: oracle + java-version: ${{ steps.get-java-version.outputs.version }} + + - name: Block compromised Java certificates + uses: Expensify/GitHub-Actions/block-compromised-java-certificates@b70c378d6cfae84f6844379eef3568cb33ea9680 + with: + restrict-gradle: 'true' + - name: Publish to GitHub Packages Maven run: ./android/gradlew -p scripts/artifacts-utils/ios/publish publish -PartifactsDir="/tmp/ios-artifacts" -PpatchedVersion="${PATCHED_VERSION}" -PpatchesHash="${PATCHES_HASH}" -PpackageName="${PACKAGE_NAME}" env: diff --git a/.github/workflows/remote-build-android.yml b/.github/workflows/remote-build-android.yml index e24ff55b08b6..15c8394639ac 100644 --- a/.github/workflows/remote-build-android.yml +++ b/.github/workflows/remote-build-android.yml @@ -90,6 +90,23 @@ jobs: role-duration-seconds: 21600 aws-region: us-east-1 + - name: Get Java version + id: get-java-version + uses: ./.github/actions/composite/getJavaVersion + + - name: Setup Java + # v5.2.0 + uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 + with: + distribution: adopt + java-version: ${{ steps.get-java-version.outputs.version }} + cache: gradle + + - name: Block compromised Java certificates + uses: Expensify/GitHub-Actions/block-compromised-java-certificates@b70c378d6cfae84f6844379eef3568cb33ea9680 + with: + restrict-gradle: 'true' + - name: Rock Remote Build - Android # rock v3 uses: callstackincubator/android@1a7d52dfe3ca195ccbe5ad2f06c15f2fc3835115 @@ -98,6 +115,8 @@ jobs: GITHUB_TOKEN: ${{ github.token }} IS_HYBRID_APP: ${{ matrix.is_hybrid_build }} with: + # Java is installed and protected before Rock can run Gradle. + setup-java: false variant: ${{ matrix.variant }} rock-build-extra-params: '--extra-params -PreactNativeArchitectures=arm64-v8a,x86_64' comment-bot: false