-
Notifications
You must be signed in to change notification settings - Fork 118
98 lines (84 loc) · 2.79 KB
/
asm_build.yml
File metadata and controls
98 lines (84 loc) · 2.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Build Android Code Studio (Debug)
on:
push:
branches:
- "dev"
- "main"
- "indexing"
- "release/**"
paths-ignore:
- '**.md'
- '**.json'
- 'fastlane/**'
- '.github/workflows/crowdin_contributors.yml'
pull_request:
branches: [ "dev" ]
workflow_dispatch: { }
jobs:
build_debug_apk:
name: Build Debug APK
runs-on: ubuntu-latest
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
- name: Change Gradle wrapper permissions
run: chmod +x ./gradlew
- name: Restore cache
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-v2-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
# === 关键修改:直接构建 Debug 包,跳过复杂的签名配置 ===
- name: Assemble Debug APK
# 添加 --stacktrace 可以在出错时看到详细日志
# 添加 -x lint 可以跳过代码检查,防止因为小警告导致构建失败
run: ./gradlew :core:app:assembleDebug --stacktrace -x lint
- name: List APK files (Debug)
run: ls -R core/app/build/outputs/apk/debug/
# === 上传步骤:路径改为 debug ===
- name: Upload arm64-v8a Debug APK
uses: actions/upload-artifact@v4
with:
name: apk-arm64-v8a-debug
path: core/app/build/outputs/apk/debug/*arm64-v8a*.apk
if: always()
- name: Upload armeabi-v7a Debug APK
uses: actions/upload-artifact@v4
with:
name: apk-armeabi-v7a-debug
path: core/app/build/outputs/apk/debug/*armeabi-v7a*.apk
if: always()
- name: Upload x86_64 Debug APK
uses: actions/upload-artifact@v4
with:
name: apk-x86_64-debug
path: core/app/build/outputs/apk/debug/*x86_64*.apk
if: always()
- name: Upload universal Debug APK
uses: actions/upload-artifact@v4
with:
name: apk-universal-debug
path: core/app/build/outputs/apk/debug/*universal*.apk
if: always() if: always()
- name: Upload universal Release APK
uses: actions/upload-artifact@v4
with:
name: apk-universal-release
path: core/app/build/outputs/apk/release/*universal*.apk
if: always()