forked from Anuken/Mindustry
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (50 loc) · 1.84 KB
/
android.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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'
- name: Fetch JRE for hopes and dreams
run: |
echo $HOME
mkdir ~/jdks
cd ~/jdks
wget https://github.com/Anuken/MindustryJreBuilds/releases/download/v2/jre-linux64.zip
wget https://github.com/Anuken/MindustryJreBuilds/releases/download/v2/jre-windows64.zip
wget https://github.com/Anuken/MindustryJreBuilds/releases/download/v2/jre-macos.zip
wget https://github.com/Anuken/MindustryJreBuilds/releases/download/v1/packr.jar
unzip jre-linux64.zip
unzip jre-windows64.zip
unzip jre-macos.zip
ls
- name: Build with Gradle
env:
keystore_password: ${{ secrets.KEYSTORE_PASSWORD_SECRET }}
keystore_alias_password: ${{ secrets.KEYSTORE_PASSWORD_SECRET }}
keystore_alias: frog
JDK_DIR: /home/runner/jdks/
run: |
git clone --depth=1 --branch=master https://github.com/Anuken/Mindustry
cd Mindustry
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: Mindustry/android/build/outputs/apk