Cemu-Android/.github/workflows/android_build.yml
SSimco a8370684a1
Some checks are pending
Android build / build (push) Waiting to run
Update build.yml
2024-10-30 16:40:47 +02:00

57 lines
1.6 KiB
YAML

name: Android build
on:
workflow_call:
workflow_dispatch:
push:
branches: ["android"]
pull_request:
branches: ["android"]
jobs:
build:
runs-on: self-hosted
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
token: ${{ secrets.GH_PAT }}
submodules: "recursive"
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: "17"
distribution: "temurin"
- name: Create store file
env:
ANDROID_STORE_FILE_BASE64: ${{ secrets.ANDROID_STORE_FILE_BASE64 }}
ANDROID_KEY_STORE_PASSWORD: ${{ secrets.ANDROID_KEY_STORE_PASSWORD }}
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
if: "${{ env.ANDROID_STORE_FILE_BASE64 != '' }}"
run: |
echo "BUILD_TYPE=Release" >> "$GITHUB_ENV"
cd ./src/android
base64 --decode <<< "${ANDROID_STORE_FILE_BASE64}" > store.jks
ANDROID_STORE_FILE=$(pwd)/store.jks
echo -e "keyStorePassword=$ANDROID_KEY_STORE_PASSWORD\nkeyAlias=$ANDROID_KEY_ALIAS\nstoreFile=$ANDROID_STORE_FILE\n" > keystore.properties
- name: Build Cemu for Android
run: |
if [[ -z "$BUILD_TYPE" ]]; then
BUILD_TYPE=Debug
fi
cd ./src/android
./gradlew assemble$BUILD_TYPE
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: cemu-android
path: |
./src/android/app/build/outputs/apk/*/*.apk
./src/android/app/build/outputs/apk/*/*.aab