feat(stage-pocket): add Android target (#1326)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: LemonNeko <self@lemonneko.moe>
This commit is contained in:
Liet Blue
2026-03-15 21:46:23 +08:00
committed by GitHub
co-authored by autofix-ci[bot] LemonNeko
parent 3c03a45b0a
commit f92db7a70b
66 changed files with 992 additions and 12 deletions
@@ -0,0 +1,68 @@
name: Release Pocket (Android)
permissions:
contents: write
actions: read
on:
release:
types:
- prereleased
workflow_dispatch:
inputs:
build_only:
description: Build only (no upload to release)
required: false
default: false
type: boolean
schedule:
- cron: '0 1 * * *'
jobs:
build:
# TODO: build release APK
name: Build Debuggable Android APK
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
- uses: pnpm/action-setup@v4
with:
run_install: false
- uses: actions/setup-node@v6
with:
node-version: lts/*
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm run build:packages
- name: Build web assets
run: pnpm -F @proj-airi/stage-pocket run build
- name: Capacitor sync
run: pnpm -F @proj-airi/stage-pocket exec cap sync android
- name: Build debug APK
working-directory: apps/stage-pocket/android
run: ./gradlew assembleDebug
- name: Upload APK artifact
uses: actions/upload-artifact@v4
with:
name: airi-pocket-android-debug
path: apps/stage-pocket/android/app/build/outputs/apk/debug/app-debug.apk
if-no-files-found: error
- name: Upload to GitHub Releases
if: ${{ github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && !inputs.build_only) }}
uses: softprops/action-gh-release@v2
with:
files: apps/stage-pocket/android/app/build/outputs/apk/debug/app-debug.apk
append_body: true
tag_name: ${{ github.event.release.tag_name }}