Files
android-ci-demo/.gitea/workflows/android-build.yml
T
amos 2ad7efb30e
Android Build / build (push) Failing after 1m31s
Simplify: Use pre-installed environment for Android build
2026-06-02 10:52:44 +08:00

43 lines
943 B
YAML

name: Android Build
on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]
workflow_dispatch:
jobs:
build:
runs-on: android
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build Debug APK
run: |
# 验证环境
echo "=== 环境检查 ==="
java -version
gradle --version
# 生成 Gradle wrapper
echo "=== 生成 Gradle Wrapper ==="
gradle wrapper --gradle-version 8.2
# 编译 Debug APK
echo "=== 开始编译 ==="
./gradlew assembleDebug --no-daemon --stacktrace
# 验证输出
echo "=== 编译完成 ==="
ls -lh app/build/outputs/apk/debug/
- name: Upload APK
uses: actions/upload-artifact@v3
with:
name: app-debug
path: app/build/outputs/apk/debug/app-debug.apk
retention-days: 7