mirror of
https://github.com/SSimco/Cemu.git
synced 2024-11-23 05:19:40 +00:00
57 lines
1.6 KiB
YAML
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
|