Android CI #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Android CI | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
cache: 'gradle' | |
- name: Build with Gradle | |
run: | | |
echo "BODY=$(git rev-parse HEAD)" >> $GITHUB_ENV | |
sed -i 's/applicationId "io.anuke.mindustry"/applicationId "io.anuke.mindustry.be"/g' android/build.gradle | |
sed -i 's/"io.anuke.mindustry"/"io.anuke.mindustry.be"/g' android/AndroidManifest.xml | |
sed -i 's/Mindustry/Mindustry BE/g' android/res/values/strings.xml | |
./gradlew pack | |
./gradlew android:assembleDebug --stacktrace | |
echo "JDK directory: $JDK_DIR" | |
echo $PWD | |
- name: Upload Android artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: funnyapk | |
path: android/build/outputs/apk |