mirror of
https://github.com/movixcorp/MovixOpenSource.git
synced 2026-07-27 00:52:08 +00:00
ci: add Android APK build job
New build_android job running on ubuntu-latest: - setup-java@v4 with JDK 17 (Temurin) matching compileOptions - npm ci + build:userscript (same as iOS job) - Gradle cache keyed on wrapper + root/app build.gradle hashes - ./gradlew assembleRelease --no-daemon - Artifact: Movix-Android-<version>, retention 30 days Both jobs now triggered independently via workflow_dispatch booleans (build_ios / build_android, both default true). APK is debug-signed (falls back to signingConfigs.debug when no keystore.properties) — suitable for sideloading. https://claude.ai/code/session_01X52sah6aUu3ou26uJWHgzr
This commit is contained in:
parent
6563874ee2
commit
9cf3ea79cf
1 changed files with 72 additions and 1 deletions
73
.github/workflows/build.yml
vendored
73
.github/workflows/build.yml
vendored
|
|
@ -1,4 +1,4 @@
|
|||
name: Build iOS IPA (Unsigned)
|
||||
name: Build Applications
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
|
@ -7,6 +7,10 @@ on:
|
|||
description: 'Build iOS IPA (unsigned)'
|
||||
type: boolean
|
||||
default: true
|
||||
build_android:
|
||||
description: 'Build Android APK'
|
||||
type: boolean
|
||||
default: true
|
||||
|
||||
jobs:
|
||||
build_ios:
|
||||
|
|
@ -112,3 +116,70 @@ jobs:
|
|||
path: app/ios/build/MovixApp-${{ steps.version.outputs.version }}.ipa
|
||||
retention-days: 30
|
||||
if-no-files-found: error
|
||||
|
||||
build_android:
|
||||
name: Build Android APK
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
if: ${{ inputs.build_android }}
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: app
|
||||
|
||||
steps:
|
||||
- name: ⬇️ • Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: 📀 • Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: ☕ • Setup JDK 17
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'temurin'
|
||||
|
||||
- name: 💾 • Cache Node Modules
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: app/node_modules
|
||||
key: node-modules-android-${{ hashFiles('app/package-lock.json') }}
|
||||
restore-keys: |
|
||||
node-modules-android-
|
||||
|
||||
- name: 🗂️ • Install Node Dependencies
|
||||
run: npm ci --legacy-peer-deps
|
||||
|
||||
- name: 📝 • Generate userscript source
|
||||
run: npm run build:userscript
|
||||
|
||||
- name: 💾 • Cache Gradle
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
key: gradle-${{ hashFiles('app/android/gradle/wrapper/gradle-wrapper.properties', 'app/android/build.gradle', 'app/android/app/build.gradle') }}
|
||||
restore-keys: |
|
||||
gradle-
|
||||
|
||||
- name: 📖 • Read app version
|
||||
id: version
|
||||
run: echo "version=$(jq -r '.version' version.json)" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: 🤖 • Build Android APK
|
||||
run: |
|
||||
cd android
|
||||
chmod +x gradlew
|
||||
./gradlew assembleRelease --no-daemon
|
||||
|
||||
- name: 🌍 • Upload APK artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Movix-Android-${{ steps.version.outputs.version }}
|
||||
path: app/android/app/build/outputs/apk/release/app-release.apk
|
||||
retention-days: 30
|
||||
if-no-files-found: error
|
||||
|
|
|
|||
Loading…
Reference in a new issue