mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-16 02:05:06 +08:00
9c18088128
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
71 lines
2.2 KiB
YAML
71 lines
2.2 KiB
YAML
name: APK Build
|
|
|
|
on:
|
|
pull_request: { }
|
|
push:
|
|
branches: [ main, develop ]
|
|
|
|
# Enrich gradle.properties for CI/CD
|
|
env:
|
|
CI_GRADLE_ARG_PROPERTIES: >
|
|
-Porg.gradle.jvmargs=-Xmx2g
|
|
-Porg.gradle.parallel=false
|
|
|
|
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 ]
|
|
# Allow all jobs on develop. Just one per PR.
|
|
concurrency:
|
|
group: ${{ github.ref == 'refs/heads/develop' && format('integration-tests-develop-{0}-{1}', matrix.target, github.sha) || format('build-debug-{0}-{1}', matrix.target, github.ref) }}
|
|
cancel-in-progress: true
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- 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 $CI_GRADLE_ARG_PROPERTIES --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'
|
|
# Only runs on main, no concurrency.
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- 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 $CI_GRADLE_ARG_PROPERTIES --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
|