Files
2026-07-01 14:08:34 +02:00

72 lines
1.9 KiB
YAML

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@v3
with:
name: PaperDash-debug.apk
path: android/app/build/outputs/apk/debug/app-debug.apk
if-no-files-found: error
- name: Update Rolling Draft Release
uses: softprops/action-gh-release@v1
with:
draft: true
tag_name: android-rolling-draft
name: "Draft (latest Android build)"
body: |
Latest PaperDash Android APK build from commit ${{ gitea.sha }}.
Edit tag, name, and notes before publishing.
files: android/app/build/outputs/apk/debug/app-debug.apk
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # auto-provided in Gitea Actions