element-android-Github/.github/workflows/build.yml

60 lines
1.7 KiB
YAML
Raw Normal View History

2021-03-27 06:52:06 +08:00
name: APK Build
on:
2021-03-27 04:19:48 +08:00
pull_request: { }
push:
2021-03-27 04:19:48 +08:00
branches: [ master, develop ]
jobs:
debug:
name: Build debug APK (${{ matrix.target }})
runs-on: ubuntu-latest
if: github.ref != 'refs/heads/master'
strategy:
fail-fast: false
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
run: ./gradlew assemble${{ matrix.target }}Debug --stacktrace
- name: Upload ${{ matrix.target }} debug APKs
uses: actions/upload-artifact@v2
with:
name: release-apk-debug-${{ matrix.target }}
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
- name: Upload Gplay unsigned APKs
uses: actions/upload-artifact@v2
with:
name: release-apk-unsigned-GPlay
path: |
vector/build/outputs/apk/*/debug/*.apk
# TODO: add exodus checks