-
Notifications
You must be signed in to change notification settings - Fork 11
49 lines (42 loc) · 1.25 KB
/
build-example-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
49
name: build-example-android
on: workflow_dispatch
jobs:
build-and-upload:
runs-on: ubuntu-latest
env:
TEST_ENDPOINT: hardware-example.onekeytest.com
PROJECT_PATH: packages/connect-examples/expo-example/android
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'zulu'
- name: Install dependencies
run: |
yarn setup
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build APK
run: |
chmod +x gradlew
./gradlew assembleRelease
working-directory: ${{ env.PROJECT_PATH }}
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: example-android
path: |
./${{ env.PROJECT_PATH }}/app/build/outputs/**/*.apk