ci: add Gitea Actions workflows for .exe and APK builds
- build-exe.yml: Python server → PyInstaller → PaperDash.exe (windows-latest) - build-apk.yml: Android project → Gradle → app-debug.apk (ubuntu-latest) - Both trigger on push/PR to main when relevant paths change
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
name: Build Android APK
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- "android/**"
|
||||
- "client/**"
|
||||
- ".gitea/workflows/build-apk.yml"
|
||||
pull_request:
|
||||
branches: [main]
|
||||
paths:
|
||||
- "android/**"
|
||||
- "client/**"
|
||||
- ".gitea/workflows/build-apk.yml"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: "17"
|
||||
distribution: "temurin"
|
||||
|
||||
- name: Sync client assets
|
||||
run: |
|
||||
cp client/index.html android/app/src/main/assets/index.html
|
||||
cp client/style.css android/app/src/main/assets/style.css
|
||||
cp client/app.js android/app/src/main/assets/app.js
|
||||
|
||||
- name: Setup Android SDK
|
||||
uses: android-actions/setup-android@v3
|
||||
with:
|
||||
cmdline-tools-version: 11076708
|
||||
platforms: "platform-34"
|
||||
build-tools: "34.0.0"
|
||||
|
||||
- name: Build APK (debug)
|
||||
working-directory: android
|
||||
run: |
|
||||
chmod +x gradlew || true
|
||||
./gradlew assembleDebug
|
||||
env:
|
||||
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
|
||||
|
||||
- name: Upload debug APK
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: PaperDash-debug.apk
|
||||
path: android/app/build/outputs/apk/debug/app-debug.apk
|
||||
if-no-files-found: error
|
||||
Reference in New Issue
Block a user