2021-03-25 19:26:26 +08:00
|
|
|
name: Build
|
|
|
|
|
|
|
|
on:
|
2021-03-27 04:19:48 +08:00
|
|
|
pull_request: { }
|
2021-03-25 19:26:26 +08:00
|
|
|
push:
|
2021-03-27 04:19:48 +08:00
|
|
|
branches: [ master, develop ]
|
2021-03-25 19:26:26 +08:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
debug:
|
|
|
|
name: Build debug APK (${{ matrix.target }})
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
if: github.ref != 'refs/heads/master'
|
|
|
|
strategy:
|
2021-03-25 20:33:46 +08:00
|
|
|
fail-fast: false
|
2021-03-25 19:26:26 +08:00
|
|
|
matrix:
|
|
|
|
target: [ Gplay, Fdroid ]
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.gradle/caches
|
|
|
|
~/.gradle/wrapper
|
|
|
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-gradle-
|
|
|
|
- name: Assemble ${{ matrix.target }} debug apk
|
2021-03-25 20:53:35 +08:00
|
|
|
run: ./gradlew assemble${{ matrix.target }}Debug --stacktrace
|
|
|
|
- name: Upload ${{ matrix.target }} debug APKs
|
2021-03-25 19:26:26 +08:00
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2021-03-25 20:53:35 +08:00
|
|
|
name: release-apk-debug-${{ matrix.target }}
|
2021-03-25 19:26:26 +08:00
|
|
|
path: |
|
|
|
|
vector/build/outputs/apk/*/debug/*.apk
|
|
|
|
|
|
|
|
gplay:
|
|
|
|
name: Build unsigned GPlay APK
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
if: github.ref == 'refs/heads/master'
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.gradle/caches
|
|
|
|
~/.gradle/wrapper
|
|
|
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-gradle-
|
|
|
|
- name: Assemble GPlay unsigned apk
|
|
|
|
run: ./gradlew clean assembleGplayRelease --stacktrace
|
2021-03-25 20:53:35 +08:00
|
|
|
- name: Upload Gplay unsigned APKs
|
2021-03-25 19:26:26 +08:00
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2021-03-25 20:53:35 +08:00
|
|
|
name: release-apk-unsigned-GPlay
|
2021-03-25 19:26:26 +08:00
|
|
|
path: |
|
|
|
|
vector/build/outputs/apk/*/debug/*.apk
|
|
|
|
|
|
|
|
# TODO: add exodus checks
|