Merge pull request #163 from luke-h1/feat/chat-improvs #1
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: Build Android Debug App | |
on: | |
push: | |
branches: | |
- main # Build on main for caching purposes, this way every branch will have access to it | |
workflow_call: | |
outputs: | |
build-cache-key: | |
description: 'The primary key used for caching the build' | |
value: android-debug-build-${{ jobs.lookup-cached-build.outputs.fingerprint }} | |
jobs: | |
lookup-cached-build: | |
name: Lookup cached debug build | |
uses: ./.github/workflows/lookup-cached-debug-build.yml | |
with: | |
platform: android | |
build-debug-android: | |
name: Build Android Debug App | |
needs: lookup-cached-build | |
if: needs.lookup-cached-build.outputs.build-exists != 'true' | |
runs-on: ubuntu-latest | |
steps: | |
- name: 💾 Maximize build space | |
uses: AdityaGarg8/[email protected] | |
with: | |
remove-dotnet: 'true' | |
remove-haskell: 'true' | |
remove-codeql: 'true' | |
remove-docker-images: 'true' | |
- name: 🏗 Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: ${{ github.head_ref }} | |
- name: 🥟 Setup Bun | |
uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version-file: '.bun-version' | |
- name: Setup Node | |
uses: actions/[email protected] | |
with: | |
node-version-file: .nvmrc | |
- name: ☕ Setup JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'zulu' | |
- name: 🐘 Setup Gradle 8.8 | |
uses: gradle/actions/setup-gradle@v4 | |
with: | |
gradle-version: 8.8 | |
- name: 📦 Install dependencies | |
run: bun install --frozen-lockfile | |
- name: 🛠️ Build | |
run: bun run build:debug:android | |
- name: 📁 Prepare cache folder | |
run: | | |
mkdir android-debug-build | |
mv ./android/app/build/outputs/apk/debug/app-debug.apk android-debug-build/android-debug.apk | |
- name: 📡 Store built app in cache | |
id: android-debug-save | |
uses: actions/cache/save@v4 | |
with: | |
path: android-debug-build/ | |
key: android-debug-build-${{ needs.lookup-cached-build.outputs.fingerprint }} |