on: [push, pull_request]

jobs:
  android-bin:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - run: bazel build -c opt :encoder_main --config=android_arm64
      - run: bazel build -c opt :decoder_main --config=android_arm64

  android-app:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Build Android app
        run: bazel build android_example:lyra_android_example --config=android_arm64 --copt=-DBENCHMARK
      - name: Upload Android APK as artifact
        uses: actions/upload-artifact@v2
        if: github.repository_owner == 'google'
        with:
          path: bazel-bin/android_example/lyra_android_example.apk

on: [push, pull_request]

jobs:
  android-bin:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - run: bazel build -c opt :encoder_main --config=android_arm64
      - run: bazel build -c opt :decoder_main --config=android_arm64

  android-app:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Build Android app
        run: bazel build android_example:lyra_android_example --config=android_arm64 --copt=-DBENCHMARK
      - name: Upload Android APK as artifact
        uses: actions/upload-artifact@v2
        if: github.repository_owner == 'google'
        with:
          path: bazel-bin/android_example/lyra_android_example.apk
          retention-days: 30

Save Android APKs 30 days
CI: Save Android APKs 30 days

instead of the default 90