Files
moeka-project/.github/workflows/release-pocket-android.yml
T
f85a809d7c refactor(stage-*): analytics and telemetry, including consent (#1414)
---------

Co-authored-by-agent: Codex <267193182+codex@users.noreply.github.com>
Co-authored-by-agent: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: RainbowBird <rbxin2003@outlook.com>
Co-authored-by: Neko <neko@ayaka.moe>
2026-03-24 13:01:39 +08:00

72 lines
1.9 KiB
YAML

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
env:
# Every current trigger path produces an installable APK artifact, so ship the analytics-enabled build consistently.
VITE_ENABLE_POSTHOG: 'true'
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 }}