-
-
Notifications
You must be signed in to change notification settings - Fork 345
55 lines (46 loc) · 1.56 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
49
50
51
52
53
54
55
name: Build
on:
workflow_call:
workflow_dispatch:
push:
env:
APP_PATH: examples/Rn071/android/app/build/outputs/apk/release/app-release.apk
PROJECT_NAME: Rn071
EXAMPLE_SRC: ./examples/Rn071/src/**
jobs:
build-android:
name: Android
runs-on: ubuntu-latest
outputs:
app: app/build/outputs/apk/release
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/cache@v4
id: cache-android
with:
path: ${{ env.APP_PATH }}
key: ${{ runner.os }}-${{ hashFiles('src/**', 'android/**', env.EXAMPLE_SRC, env.APP_PATH ) }}
- uses: actions/setup-node@v4
if: steps.cache-android.outputs.cache-hit != 'true'
with:
node-version: 18
cache: 'yarn'
- name: Install npm dependencies (example project)
if: steps.cache-android.outputs.cache-hit != 'true'
working-directory: ./examples/${{ env.PROJECT_NAME }}/
run: yarn install --frozen-lockfile
- name: Install npm dependencies (root)
if: steps.cache-android.outputs.cache-hit != 'true'
working-directory: ./
run: yarn install --frozen-lockfile
- uses: actions/setup-java@v4
if: steps.cache-android.outputs.cache-hit != 'true'
with:
java-version: 11
distribution: 'temurin'
- name: build
if: steps.cache-android.outputs.cache-hit != 'true'
working-directory: ./examples/${{ env.PROJECT_NAME }}/android
run: ./gradlew assembleRelease