-
-
Notifications
You must be signed in to change notification settings - Fork 115
57 lines (50 loc) · 1.52 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Android
on:
push:
branches:
- master
- fix-ci
pull_request:
paths:
- '.github/workflows/main.yml'
- 'src/**'
- 'android/**'
- 'MMKV/**'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- version: '0.75.x'
folder: 'rn75'
steps:
- uses: actions/checkout@v2
- run: printenv
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ matrix.version }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Build Android apk (release & debug)
env:
RN_VERSION: ${{ matrix.version }}
RN_FOLDER: ${{ matrix.folder }}
ANDROID_NDK_HOME: /usr/local/lib/android/sdk/ndk/26.1.10909125
run: |
echo $RN_VERSION $RN_FOLDER $ANDROID_NDK_HOME
[[ "$RN_VERSION" == "reanimated-2" ]] && git clone --depth=1 https://github.com/software-mansion-labs/reanimated-2-playground.git "$RN_FOLDER" || npx react-native init "$RN_FOLDER" --version "$RN_VERSION"
npm ci --legacy-peer-deps
npm run build
rm -rf node_modules
cd "$RN_FOLDER"
yarn add file:..
cd ./android
./gradlew assembleRelease
./gradlew assembleDebug