-
-
Notifications
You must be signed in to change notification settings - Fork 26
48 lines (36 loc) · 1.05 KB
/
build-android.yml
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
name: Build CI For Android
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: 设置权限
run: chmod -R 755 ./src-capacitor/android/
- name: 设置 JDK
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: 设置 Android SDK
uses: android-actions/setup-android@v3
- name: 设置环境变量
run: export PATH=$PATH:$ANDROID_SDK_ROOT/tools; PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools
- name: 设置 Node.js
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'npm'
- name: 安装依赖
run: npm i
- name: 构建 Android
run: npm run build:android
- name: 上传 Apk
uses: actions/upload-artifact@v3
with:
name: app-release-unsigned
path: ./dist/capacitor/android/apk/release/app-release-unsigned.apk