name: Build

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - name: Clone repository
      uses: actions/checkout@v2
    - name: Build
      run: |
        ./gradlew assembleDebug
    - name: Build companion package
      run: |
        ./build_termux_package
    - name: Store generated APK file
      uses: actions/upload-artifact@v2
      with:
        name: termux-x11
        path: ./app/build/outputs/apk/debug
