46 lines
1.2 KiB
YAML
46 lines
1.2 KiB
YAML
name: Build
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build_apk:
|
|
name: Generate APK
|
|
runs-on: ubuntu-18.04
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v2
|
|
- name: Setup Node.js environment
|
|
uses: actions/setup-node@v2.1.5
|
|
with:
|
|
node-version: '12'
|
|
- name: Set up JDK 12
|
|
uses: actions/setup-java@v1
|
|
with:
|
|
java-version: 12
|
|
|
|
- name: Decode google-services.json
|
|
env:
|
|
FIREBASE_SECRET: ${{ secrets.FIREBASE_SECRET }}
|
|
run: echo $FIREBASE_SECRET > app/google-services.json
|
|
|
|
# Cache gradle
|
|
- name: Cache Gradle and wrapper
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: |
|
|
~/.gradle/caches
|
|
~/.gradle/wrapper
|
|
key: cache-${{ runner.os }}-${{ matrix.jdk }}-gradle-${{ hashFiles('**/*.gradle*') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-gradle-
|
|
- name: Grant Permission to Execute
|
|
run: chmod +x gradlew
|
|
|
|
- name: Build debug APK
|
|
run: bash ./gradlew assembleDebug --stacktrace
|
|
- name: Upload APK
|
|
uses: actions/upload-artifact@v1
|
|
with:
|
|
name: app
|
|
path: app/build/outputs/apk/debug/app-debug.apk
|