Skip to content

Commit e831ebd

Browse files
Maksimrubenwardy
Maksim
authored andcommittedOct 13, 2020
Android: add ci with saving artifacts
1 parent 05436fb commit e831ebd

File tree

2 files changed

+46
-1
lines changed

2 files changed

+46
-1
lines changed
 

Diff for: ‎.github/workflows/android.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: android
2+
3+
# build on c/cpp changes or workflow changes
4+
on:
5+
push:
6+
paths:
7+
- 'lib/**.[ch]'
8+
- 'lib/**.cpp'
9+
- 'src/**.[ch]'
10+
- 'src/**.cpp'
11+
- 'build/android/**'
12+
- '.github/workflows/android.yml'
13+
pull_request:
14+
paths:
15+
- 'lib/**.[ch]'
16+
- 'lib/**.cpp'
17+
- 'src/**.[ch]'
18+
- 'src/**.cpp'
19+
- 'build/android/**'
20+
- '.github/workflows/android.yml'
21+
22+
jobs:
23+
build:
24+
runs-on: ubuntu-18.04
25+
steps:
26+
- uses: actions/checkout@v2
27+
- name: Set up JDK 1.8
28+
uses: actions/setup-java@v1
29+
with:
30+
java-version: 1.8
31+
- name: Build with Gradle
32+
run: cd build/android; ./gradlew assemblerelease
33+
- name: Save armeabi artifact
34+
uses: actions/upload-artifact@v2
35+
with:
36+
name: Minetest-armeabi-v7a.apk
37+
path: build/android/app/build/outputs/apk/release/app-armeabi-v7a-release-unsigned.apk
38+
- name: Save arm64 artifact
39+
uses: actions/upload-artifact@v2
40+
with:
41+
name: Minetest-arm64-v8a.apk
42+
path: build/android/app/build/outputs/apk/release/app-arm64-v8a-release-unsigned.apk

Diff for: ‎build/android/app/build.gradle

+4-1
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,11 @@ android {
1111
versionCode project.versionCode
1212
}
1313

14+
// load properties
1415
Properties props = new Properties()
15-
props.load(new FileInputStream(file('../local.properties')))
16+
def propfile = file('../local.properties')
17+
if (propfile.exists())
18+
props.load(new FileInputStream(propfile))
1619

1720
if (props.getProperty('keystore') != null) {
1821
signingConfigs {

0 commit comments

Comments
 (0)
Please sign in to comment.