aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/android.yml
blob: cc5fe83ef89d68035006aa96e99510e3ebf60cdb (plain)
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
name: android

# build on c/cpp changes or workflow changes
on:
  push:
    paths:
      - 'lib/**.[ch]'
      - 'lib/**.cpp'
      - 'src/**.[ch]'
      - 'src/**.cpp'
      - 'android/**'
      - '.github/workflows/android.yml'
  pull_request:
    paths:
      - 'lib/**.[ch]'
      - 'lib/**.cpp'
      - 'src/**.[ch]'
      - 'src/**.cpp'
      - 'android/**'
      - '.github/workflows/android.yml'

jobs:
  build:
    runs-on: ubuntu-20.04
    steps:
    - uses: actions/checkout@v2
    - name: Install deps
      run: |
        sudo apt-get update
        sudo apt-get install -y --no-install-recommends gettext openjdk-11-jdk-headless
    - name: Build with Gradle
      run: cd android; ./gradlew assemblerelease
    - name: Save armeabi artifact
      uses: actions/upload-artifact@v2
      with:
        name: Minetest-armeabi-v7a.apk
        path: 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: android/app/build/outputs/apk/release/app-arm64-v8a-release-unsigned.apk