Files
App/.github/workflows/build-android.yml
dependabot[bot] 470f465c3b Bump actions/upload-artifact from 4 to 6 (#837)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 6.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v4...v6)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Violet Caulfield <42452695+anultravioletaurora@users.noreply.github.com>
2025-12-29 15:36:00 -06:00

79 lines
2.2 KiB
YAML

name: Build Android APK
on:
pull_request:
paths:
- '.github/workflows/build-android.yml'
- 'android/**'
- 'package.json'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build-android:
runs-on: macos-15
steps:
- name: 🛒 Checkout
uses: actions/checkout@v6
- name: 🖥 Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.4
- name: 💎 Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0' # Match your local Ruby version
bundler-cache: true
- name: 💬 Echo package.json version to Github ENV
run: echo VERSION_NUMBER=$(bun -p "require('./package.json').version") >> $GITHUB_ENV
- name: 🔑 Decode and setup release keystore
continue-on-error: true
run: |
if [ -n "${{ secrets.ANDROID_SIGNING_BASE64 }}" ]; then
echo "${{ secrets.ANDROID_SIGNING_BASE64 }}" | base64 --decode > android/app/jellify.keystore
echo "Release keystore created"
else
echo "No keystore secret found, will use debug keystore"
fi
- uses: actions/cache@v5
with:
path: |
node_modules
~/.gradle/caches
~/.gradle/wrapper
~/.cache/turbo
android/.gradle
android/app/build
key: ${{ runner.os }}-gradle-turbo-${{ hashFiles('**/build.gradle') }}
restore-keys: |
${{ runner.os }}-gradle-turbo-
- name: 🤖 Run bun init-android
run: bun i
- name: 🚀 Run turbo build
run: bun android-build
env:
KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}
- name: 📦 Upload APK for testing
uses: actions/upload-artifact@v6
if: always()
with:
name: jellify-android-pr-${{ github.event.number }}-${{ env.VERSION_NUMBER }}
path: |
android/app/build/outputs/apk/release/*.apk
retention-days: 7
if-no-files-found: warn