mirror of
https://github.com/element-hq/element-android
synced 2024-12-21 08:54:12 +03:00
59 lines
1.7 KiB
YAML
59 lines
1.7 KiB
YAML
name: APK Build
|
|
|
|
on:
|
|
pull_request: { }
|
|
push:
|
|
branches: [ main, develop ]
|
|
|
|
jobs:
|
|
debug:
|
|
name: Build debug APKs (${{ matrix.target }})
|
|
runs-on: ubuntu-latest
|
|
if: github.ref != 'refs/heads/main'
|
|
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: vector-${{ matrix.target }}-debug
|
|
path: |
|
|
vector/build/outputs/apk/*/debug/*.apk
|
|
|
|
release:
|
|
name: Build unsigned GPlay APKs
|
|
runs-on: ubuntu-latest
|
|
if: github.ref == 'refs/heads/main'
|
|
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: vector-gplay-release-unsigned
|
|
path: |
|
|
vector/build/outputs/apk/*/release/*.apk
|
|
|
|
# TODO: add exodus checks
|