Skip to content

Build Artifacts

Build Artifacts #19

Workflow file for this run

name: Build Artifacts
on:
workflow_dispatch:
jobs:
deploy:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
with:
ref: master
submodules: recursive
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Create artifacts
run: |
./gradlew android:assembleDebug --stacktrace --info
mv android/build/outputs/apk/debug/android-release.apk android/build/outputs/apk/debug/Mindustry-BE-Android-${RELEASE_VERSION}.apk
# 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 android:assembleDebug -Pbuildversion=${RELEASE_VERSION} -PversionType=bleeding-edge -PshowCommitHash --stacktrace
# echo "JDK directory: $JDK_DIR"
# echo $PWD
- name: Upload Android artifacts
uses: actions/upload-artifact@v4
with:
name: funnyapk
path: Mindustry/android/build/outputs/apk #/debug/Mindustry-BE-Android-${{ env.RELEASE_VERSION }}.apk