Merge remote-tracking branch 'origin/main' #10
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 CI | |
on: | |
pull_request: | |
branches: [ main ] | |
push: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
# Code checkout | |
- name: Checkout code | |
id: checkout_code | |
uses: actions/checkout@v4 | |
# Setup java | |
- name: Setup JDK 17 | |
id: setup_jdk | |
uses: actions/setup-java@v4 | |
with: | |
distribution: "zulu" | |
java-version: 17 | |
# Copy secrets | |
- name: Copy secrets | |
id: copy_secrets | |
env: | |
API_READ_ACCESS_TOKEN: ${{ secrets.API_READ_ACCESS_TOKEN }} | |
run: | | |
touch ./local.properties | |
echo api_read_access_token=\"$API_READ_ACCESS_TOKEN\" >> ./local.properties | |
cat ./local.properties | |
# 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- | |
# Grant execute permission for gradlew | |
- name: Grant execute permission for gradlew | |
id: grant_gradle_permission | |
run: chmod +x gradlew | |
# Generate debug build | |
- name: Build Android app | |
id: generate_debug_build | |
if: always() | |
run: ./gradlew assembleDebug | |
# Build ios shared code | |
- name: Build iOS shared code | |
id: build_ios_shared_code | |
run: ./gradlew :shared:compileKotlinIosArm64 |