name: build

on: [push, pull_request]

jobs:
  build-android:
    runs-on: ubuntu-latest
    steps:
    - name: Setup Java 8
      uses: actions/setup-java@v1.3.0
      with:
        java-version: 1.8
    - name: Checkout
      uses: actions/checkout@v2
    - name: Submodule Init
      run: git submodule sync --recursive && git submodule update --init --force --recursive
    - name: Build
      run: bash ./gradlew assembleRelease
    - name: Artifact
      uses: actions/upload-artifact@v1.0.0
      with:
        name: unsigned-apk
        path: app/build/outputs/apk
