ci: Added build job for Android Google Play flavor

This commit is contained in:
OpenSauce04 2025-12-29 00:12:19 +00:00 committed by OpenSauce
parent 6751c20f52
commit a84a58b613
2 changed files with 16 additions and 6 deletions

View file

@ -9,8 +9,14 @@ fi
cd src/android cd src/android
chmod +x ./gradlew chmod +x ./gradlew
./gradlew assembleRelease
./gradlew bundleRelease if [[ "$TARGET" == "googleplay" ]]; then
./gradlew assembleGooglePlayRelease
./gradlew bundleGooglePlayRelease
else
./gradlew assembleVanillaRelease
./gradlew bundleVanillaRelease
fi
ccache -s -v ccache -s -v

View file

@ -221,12 +221,16 @@ jobs:
android: android:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target: ["vanilla", "googleplay"]
env: env:
CCACHE_DIR: ${{ github.workspace }}/.ccache CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_COMPILERCHECK: content CCACHE_COMPILERCHECK: content
CCACHE_SLOPPINESS: time_macros CCACHE_SLOPPINESS: time_macros
OS: android OS: android
TARGET: universal TARGET: ${{ matrix.target }}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
@ -238,16 +242,16 @@ jobs:
~/.gradle/caches ~/.gradle/caches
~/.gradle/wrapper ~/.gradle/wrapper
${{ env.CCACHE_DIR }} ${{ env.CCACHE_DIR }}
key: ${{ runner.os }}-android-${{ github.sha }} key: ${{ runner.os }}-${{ env.OS }}-${{ matrix.target }}-${{ github.sha }}
restore-keys: | restore-keys: |
${{ runner.os }}-android- ${{ runner.os }}-${{ env.OS }}-${{ matrix.target }}-
- name: Set tag name - name: Set tag name
run: | run: |
if [[ "$GITHUB_REF_TYPE" == "tag" ]]; then if [[ "$GITHUB_REF_TYPE" == "tag" ]]; then
echo "GIT_TAG_NAME=$GITHUB_REF_NAME" >> $GITHUB_ENV echo "GIT_TAG_NAME=$GITHUB_REF_NAME" >> $GITHUB_ENV
fi fi
echo $GIT_TAG_NAME echo $GIT_TAG_NAME
- name: Deps - name: Install tools
run: | run: |
sudo apt-get update -y sudo apt-get update -y
sudo apt-get install ccache apksigner -y sudo apt-get install ccache apksigner -y