Android & iOS #10
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Android & iOS | |
on: [push] | |
env: | |
RN_APP_NAME: MyApp | |
jobs: | |
build_app: | |
strategy: | |
fail-fast: false | |
matrix: | |
new_arch_enabled: [1, 0] | |
rn_ver: [0.72.3, 0.71.12, 0.70.13, 0.69.12] #, 0.68.7, 0.67.5, 0.66.5, 0.65.3 | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- 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 |