Update github actions config #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: android workflow | |
on: pull_request | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# 1: Code Checkout | |
- name: Checkout code | |
id: checkout_code | |
uses: actions/checkout@v2 | |
# 2: Setup Java | |
- name: Setup JDK 17 | |
id: setup_jdk | |
uses: actions/setup-java@v3 | |
with: | |
distribution: "temurin" | |
java-version: 17 | |
# 3: Caching Gradle Packages | |
- uses: actions/cache@v3 | |
name: Cache Gradle for quicker builds | |
id: caching_gradle | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
# 4: Grant execute permission for gradlew | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
# 5: Build APK | |
- name: Build APK | |
if: always() | |
run: bash ./gradlew assembleDebug --stacktrace |