-
Notifications
You must be signed in to change notification settings - Fork 12
41 lines (41 loc) · 1.17 KB
/
main.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
name: Build Android
on:
push:
branches: [ "master" ]
jobs:
android-build:
name: Android Build
runs-on: ubuntu-latest
steps:
- name: Show runner machine infomation
run: uname -a
- name: Cancel previous runs
uses: styfle/[email protected]
- name: Checkout repo from master branch
uses: actions/checkout@v3
with:
ref: master
- name: Install npm dependency
run: yarn install
- name: Install npm dependency
run: |
cd example
yarn install
- name: Setup Android SDK
uses: android-actions/setup-android@v2
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Execute Gradle build
run: |
cd example/android && ./gradlew build
- name: Build Android JS Bundle
run: |
yarn run package-android