From 8accd2f576f3be752e3b0631c50ef754713807cd Mon Sep 17 00:00:00 2001 From: OpenSauce04 Date: Mon, 29 Dec 2025 14:49:57 +0000 Subject: [PATCH] ci: Only build Android googleplay target for tags I couldn't find any method of entirely skipping a single target in a matrix, so skipping each job is the next best thing. --- .github/workflows/build.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 766326e70..10b8ace96 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -231,11 +231,14 @@ jobs: CCACHE_SLOPPINESS: time_macros OS: android TARGET: ${{ matrix.target }} + SHOULD_RUN: ${{ (matrix.target == 'vanilla' || github.ref_type == 'tag') }} steps: - uses: actions/checkout@v4 + if: ${{ env.SHOULD_RUN == 'true' }} with: submodules: recursive - name: Set up cache + if: ${{ env.SHOULD_RUN == 'true' }} uses: actions/cache@v4 with: path: | @@ -246,30 +249,36 @@ jobs: restore-keys: | ${{ runner.os }}-${{ env.OS }}-${{ matrix.target }}- - name: Set tag name + if: ${{ env.SHOULD_RUN == 'true' }} run: | if [[ "$GITHUB_REF_TYPE" == "tag" ]]; then echo "GIT_TAG_NAME=$GITHUB_REF_NAME" >> $GITHUB_ENV fi echo $GIT_TAG_NAME - name: Install tools + if: ${{ env.SHOULD_RUN == 'true' }} run: | sudo apt-get update -y sudo apt-get install ccache apksigner -y - name: Update Android SDK CMake version + if: ${{ env.SHOULD_RUN == 'true' }} run: | echo "y" | ${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager "cmake;3.30.3" - name: Build + if: ${{ env.SHOULD_RUN == 'true' }} run: JAVA_HOME=$JAVA_HOME_17_X64 ./.ci/android.sh env: ANDROID_KEYSTORE_B64: ${{ secrets.ANDROID_KEYSTORE_B64 }} ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }} ANDROID_KEYSTORE_PASS: ${{ secrets.ANDROID_KEYSTORE_PASS }} - name: Pack + if: ${{ env.SHOULD_RUN == 'true' }} run: ../../../.ci/pack.sh working-directory: src/android/app env: UNPACKED: 1 - name: Upload + if: ${{ env.SHOULD_RUN == 'true' }} uses: actions/upload-artifact@v4 with: name: ${{ env.OS }}-${{ env.TARGET }}