2020-01-26 06:10:01 +00:00
|
|
|
on:
|
2020-02-25 09:52:05 +00:00
|
|
|
push:
|
|
|
|
branches-ignore:
|
|
|
|
- master
|
2020-05-04 15:29:52 +00:00
|
|
|
paths:
|
|
|
|
- '.github/**'
|
|
|
|
- 'app/**'
|
|
|
|
- 'gradle/**'
|
|
|
|
- '*.properties'
|
|
|
|
- '*.gradle'
|
|
|
|
- 'gradlew'
|
|
|
|
- 'gradlew.bat'
|
2020-01-26 06:10:01 +00:00
|
|
|
|
2020-02-25 09:52:05 +00:00
|
|
|
name: Build debug
|
2020-01-26 06:10:01 +00:00
|
|
|
jobs:
|
2020-02-25 09:52:05 +00:00
|
|
|
generate-debug-build:
|
2020-01-26 06:10:01 +00:00
|
|
|
runs-on: ubuntu-latest
|
2020-02-25 09:52:05 +00:00
|
|
|
if: "!contains(github.event.head_commit.message, '[ci skip]')"
|
2020-01-26 06:10:01 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v1
|
|
|
|
|
|
|
|
- name: Decrypt secrets
|
|
|
|
run: release/signing-setup.sh "$ENCRYPT_KEY"
|
|
|
|
env:
|
|
|
|
ENCRYPT_KEY: ${{ secrets.ENCRYPT_KEY }}
|
|
|
|
|
2020-02-25 09:52:05 +00:00
|
|
|
- name: Copy CI gradle.properties
|
|
|
|
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
|
|
|
|
|
2020-05-01 09:50:57 +00:00
|
|
|
- name: Generate cache key
|
|
|
|
run: ./.github/checksum.sh checksum.txt
|
|
|
|
|
|
|
|
- name: Cache gradle modules
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: ~/.gradle/caches/modules-2
|
|
|
|
key: ${{ runner.os }}-gradlemodules-${{ hashFiles('checksum.txt') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-gradlemodules-
|
|
|
|
|
|
|
|
- name: Cache gradle jars
|
|
|
|
uses: actions/cache@v1
|
|
|
|
with:
|
|
|
|
path: ~/.gradle/caches/jars-3
|
|
|
|
key: ${{ runner.os }}-gradlejars-${{ hashFiles('checksum.txt') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-gradlejars-
|
|
|
|
|
|
|
|
- name: Cache gradle build
|
|
|
|
uses: actions/cache@v1
|
2020-01-26 06:10:01 +00:00
|
|
|
with:
|
2020-05-01 09:50:57 +00:00
|
|
|
path: ~/.gradle/caches/build-cache-1
|
|
|
|
key: ${{ runner.os }}-gradlebuildcache-${{ hashFiles('checksum.txt') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-gradlebuildcache-
|
2020-01-26 06:10:01 +00:00
|
|
|
|
|
|
|
- name: Download gradle dependencies
|
|
|
|
run: ./gradlew dependencies
|
|
|
|
|
2020-02-25 09:52:05 +00:00
|
|
|
- name: Build debug app
|
|
|
|
run: ./gradlew :app:assembleDebug
|
2020-01-26 06:10:01 +00:00
|
|
|
|
|
|
|
- name: Clean secrets
|
|
|
|
run: release/signing-cleanup.sh
|
|
|
|
|
2020-02-25 09:52:05 +00:00
|
|
|
- name: Send APK to Telegram
|
|
|
|
run: release/deploy-telegram.sh
|
2020-01-26 06:10:01 +00:00
|
|
|
env:
|
2020-02-25 09:52:05 +00:00
|
|
|
TG_TO: ${{ secrets.TELEGRAM_TO }}
|
|
|
|
TG_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
|
|
|
|
TG_FILE: ./app/build/outputs/apk/debug/app-debug.apk
|