-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (45 loc) · 1.42 KB
/
build_android.yaml
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
58
name: Build Android
on: [push]
env:
RN_APP_NAME: MyApp
jobs:
build_app:
strategy:
fail-fast: false
matrix:
new_arch_enabled: [1, 0]
rn_ver: [0.73.4, 0.72.10, 0.71.16, 0.70.15, 0.69.12] #, 0.68.7, 0.67.5, 0.66.5, 0.65.3
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup Java 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: Setup Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
- name: Build Tmp React Native App
env:
# enable new arch for iOS
RCT_NEW_ARCH_ENABLED: ${{ matrix.new_arch_enabled }}
run: |
cd /tmp
# Create new tmp React Native
npx react-native@${{ matrix.rn_ver }} init $RN_APP_NAME --version ${{ matrix.rn_ver }}
cd $RN_APP_NAME
# Install my module
yarn add file:${{ github.workspace }}
# Debug info
npx react-native info
# Enable new arch for Android
if [[ $RCT_NEW_ARCH_ENABLED == '1' ]]; then
sed -i 's/newArchEnabled=false/newArchEnabled=true/' android/gradle.properties
fi
# Build Android App
./android/gradlew assembleRelease -p android -PreactNativeArchitectures=x86_64