83 lines
2.3 KiB
YAML
83 lines
2.3 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- renovate/**
|
|
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up JDK
|
|
uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # v3.12.0
|
|
with:
|
|
distribution: temurin
|
|
java-version: 18
|
|
|
|
- name: Run unit tests
|
|
uses: gradle/gradle-build-action@a4cf152f482c7ca97ef56ead29bf08bcd953284c # v2.7.0
|
|
with:
|
|
arguments: --no-configuration-cache --stacktrace check -PslimTests
|
|
gradle-home-cache-cleanup: true
|
|
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
|
|
dependency-graph: generate-and-submit
|
|
|
|
- name: (Fail-only) Upload test report
|
|
if: failure()
|
|
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
|
|
with:
|
|
name: Test report
|
|
path: android/build/reports
|
|
|
|
deploy-release-snapshot:
|
|
runs-on: ubuntu-latest
|
|
if: "github.event_name == 'push' && github.event.ref == 'refs/heads/main'"
|
|
needs: [ "check" ]
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
|
|
|
|
- name: Set up JDK
|
|
uses: actions/setup-java@cd89f46ac9d01407894225f350157564c9c7cee2 # v3.12.0
|
|
with:
|
|
distribution: temurin
|
|
java-version: 18
|
|
|
|
- name: Decrypt secrets
|
|
run: |
|
|
./scripts/setup-age.sh
|
|
./scripts/signing-setup.sh "$AGE_SECRET_KEY"
|
|
env:
|
|
AGE_SECRET_KEY: ${{ secrets.AGE_SECRET_KEY }}
|
|
|
|
- name: Build release app
|
|
uses: gradle/gradle-build-action@a4cf152f482c7ca97ef56ead29bf08bcd953284c # v2.7.0
|
|
env:
|
|
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
|
|
with:
|
|
arguments: --no-configuration-cache --stacktrace collectReleaseApks
|
|
gradle-home-cache-cleanup: true
|
|
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
|
|
|
|
- name: Clean secrets
|
|
run: scripts/signing-cleanup.sh
|
|
|
|
- name: Deploy snapshot
|
|
run: scripts/deploy-snapshot.sh
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|