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.
This commit is contained in:
OpenSauce04 2025-12-29 14:49:57 +00:00 committed by OpenSauce
parent a84a58b613
commit 8accd2f576

View File

@ -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 }}