]> git.lizzy.rs Git - dragonfireclient.git/commitdiff
Android: add ci with saving artifacts
authorMaksim <MoNTE48@mail.ua>
Sun, 24 May 2020 10:57:05 +0000 (12:57 +0200)
committerrubenwardy <rw@rubenwardy.com>
Tue, 13 Oct 2020 19:28:31 +0000 (20:28 +0100)
.github/workflows/android.yml [new file with mode: 0644]
build/android/app/build.gradle

diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml
new file mode 100644 (file)
index 0000000..0fcfe23
--- /dev/null
@@ -0,0 +1,42 @@
+name: android
+
+# build on c/cpp changes or workflow changes
+on:
+  push:
+    paths:
+      - 'lib/**.[ch]'
+      - 'lib/**.cpp'
+      - 'src/**.[ch]'
+      - 'src/**.cpp'
+      - 'build/android/**'
+      - '.github/workflows/android.yml'
+  pull_request:
+    paths:
+      - 'lib/**.[ch]'
+      - 'lib/**.cpp'
+      - 'src/**.[ch]'
+      - 'src/**.cpp'
+      - 'build/android/**'
+      - '.github/workflows/android.yml'
+
+jobs:
+  build:
+    runs-on: ubuntu-18.04
+    steps:
+    - uses: actions/checkout@v2
+    - name: Set up JDK 1.8
+      uses: actions/setup-java@v1
+      with:
+        java-version: 1.8
+    - name: Build with Gradle
+      run: cd build/android; ./gradlew assemblerelease
+    - name: Save armeabi artifact
+      uses: actions/upload-artifact@v2
+      with:
+        name: Minetest-armeabi-v7a.apk
+        path: build/android/app/build/outputs/apk/release/app-armeabi-v7a-release-unsigned.apk
+    - name: Save arm64 artifact
+      uses: actions/upload-artifact@v2
+      with:
+        name: Minetest-arm64-v8a.apk
+        path: build/android/app/build/outputs/apk/release/app-arm64-v8a-release-unsigned.apk
index 8e87424b524de5e451b75051d224fb0c14a9808b..2c0a02b7fd7b0977d64b165d1d8fc4a7eae71e6e 100644 (file)
@@ -11,8 +11,11 @@ android {
                versionCode project.versionCode
        }
 
+       // load properties
        Properties props = new Properties()
-       props.load(new FileInputStream(file('../local.properties')))
+       def propfile = file('../local.properties')
+       if (propfile.exists())
+               props.load(new FileInputStream(propfile))
 
        if (props.getProperty('keystore') != null) {
                signingConfigs {