-
Notifications
You must be signed in to change notification settings - Fork 94
53 lines (43 loc) · 1.14 KB
/
build-apk.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
49
50
51
52
53
name: Build Android APK
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup node 16
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Set up JDK 1.8
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- name: Install dependencies
run: |
npm install
cd example
npm install
- name: Build APK
run: |
npm run prepack
cd example/android
./gradlew assembleRelease
mv app/build/outputs/apk/release/app-release.apk app-release-${{ github.sha }}.apk
ls
pwd
echo ${{ github.workspace }}
- name: Upload APK
uses: actions/upload-artifact@v3
with:
name: app-release-${{ github.sha }}.apk
path: example/android/app-release-${{ github.sha }}.apk