forked from Ninjalama/streamyfin_mirror
Some checks failed
🔒 Lockfile Consistency Check / 🔍 Check bun.lock and package.json consistency (pull_request) Successful in 16s
🛡️ CodeQL Analysis / 🔎 Analyze with CodeQL (javascript-typescript) (pull_request) Failing after 53s
🏷️🔀Merge Conflict Labeler / 🏷️ Labeling Merge Conflicts (pull_request_target) Has been skipped
🚦 Security & Quality Gate / 📝 Validate PR Title (pull_request_target) Failing after 8s
🚦 Security & Quality Gate / 🔍 Vulnerable Dependencies (pull_request_target) Failing after 9s
🤖 iOS IPA Build / 🏗️ Build iOS IPA (pull_request) Has been cancelled
🚦 Security & Quality Gate / 🔍 Lint & Test (check) (pull_request_target) Has been cancelled
🚦 Security & Quality Gate / 🔍 Lint & Test (lint) (pull_request_target) Has been cancelled
84 lines
2.5 KiB
YAML
84 lines
2.5 KiB
YAML
name: 🤖 Android APK Build
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
branches: [develop, master]
|
|
push:
|
|
branches: [develop, master]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-24.04
|
|
name: 🏗️ Build Android APK
|
|
permissions:
|
|
contents: read
|
|
|
|
steps:
|
|
- name: 📥 Checkout code
|
|
uses: actions/checkout@v4 # v4.2.2
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
|
show-progress: false
|
|
submodules: recursive
|
|
fetch-depth: 0
|
|
|
|
- name: 🍞 Setup Bun
|
|
uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2.0.2
|
|
with:
|
|
bun-version: '1.2.15'
|
|
|
|
- name: ☕ Setup JDK
|
|
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
|
|
with:
|
|
distribution: 'zulu'
|
|
java-version: '17'
|
|
|
|
- name: Set up Android SDK
|
|
if: ${{ env.ACT }} # Only run on local act setups, as GitHub Actions provides the Android SDK on Ubuntu
|
|
uses: android-actions/setup-android@v2
|
|
|
|
- name: 💾 Cache Bun dependencies
|
|
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
|
|
with:
|
|
path: ~/.bun/install/cache
|
|
key: ${{ runner.os }}-bun-cache-${{ hashFiles('bun.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-bun-cache-
|
|
|
|
- name: 📦 Install dependencies
|
|
run: |
|
|
bun install --frozen-lockfile
|
|
bun run submodule-reload
|
|
|
|
- name: 💾 Cache Android dependencies
|
|
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
|
|
with:
|
|
path: |
|
|
android/.gradle
|
|
key: ${{ runner.os }}-android-deps-${{ hashFiles('android/**/build.gradle') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-android-deps-
|
|
|
|
- name: 🛠️ Generate project files
|
|
run: bun run prebuild
|
|
|
|
- name: 🚀 Build APK via Bun
|
|
run: bun run build:android:local
|
|
|
|
- name: 📅 Set date tag
|
|
run: echo "DATE_TAG=$(date +%d-%m-%Y_%H-%M-%S)" >> $GITHUB_ENV
|
|
|
|
- name: 📤 Upload APK artifact
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
with:
|
|
name: streamyfin-apk-${{ env.DATE_TAG }}
|
|
path: |
|
|
android/app/build/outputs/apk/release/*.apk
|
|
android/app/build/outputs/bundle/release/*.aab
|
|
retention-days: 7
|