-
Notifications
You must be signed in to change notification settings - Fork 19
44 lines (36 loc) · 1.21 KB
/
build.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
name: Build Android
on:
pull_request:
branches: [master]
push:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache node_modules/
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.OS }}-yarn-cache-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.OS }}-yarn-cache-
- run: yarn --frozen-lockfile
- name: Cache gradle
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Bundle JS
run: npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/ --verbose
- name: Build APK (gradle)
run: ./gradlew assembleDebug --no-daemon
working-directory: ./android
- name: Upload APK
uses: actions/upload-artifact@v1
with:
name: Debug APK
path: android/app/build/outputs/apk/debug/app-debug.apk