mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-13 19:37:00 +05:30
70 lines
1.5 KiB
YAML
70 lines
1.5 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- renovate/**
|
|
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3.0.2
|
|
|
|
- name: Set up JDK
|
|
uses: actions/setup-java@v3.5.1
|
|
with:
|
|
distribution: temurin
|
|
java-version: 18
|
|
|
|
- name: Run unit tests
|
|
uses: gradle/gradle-build-action@v2.3.1
|
|
with:
|
|
arguments: check -PslimTests
|
|
gradle-home-cache-cleanup: true
|
|
|
|
- name: (Fail-only) Upload test report
|
|
if: failure()
|
|
uses: actions/upload-artifact@v3.1.0
|
|
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@v3.0.2
|
|
|
|
- name: Set up JDK
|
|
uses: actions/setup-java@v3.5.1
|
|
with:
|
|
distribution: temurin
|
|
java-version: 18
|
|
|
|
- name: Decrypt secrets
|
|
run: scripts/signing-setup.sh "$ENCRYPT_KEY"
|
|
env:
|
|
ENCRYPT_KEY: ${{ secrets.ENCRYPT_KEY }}
|
|
|
|
- name: Build release app
|
|
uses: gradle/gradle-build-action@v2.3.1
|
|
with:
|
|
arguments: collectReleaseApks
|
|
gradle-home-cache-cleanup: true
|
|
|
|
- name: Clean secrets
|
|
run: scripts/signing-cleanup.sh
|
|
|
|
- name: Deploy snapshot
|
|
run: scripts/deploy-snapshot.sh
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|