Skip to content

chore: RN Upgrade

chore: RN Upgrade #125

Workflow file for this run

name: Build iOS
on:
push:
branches:
- main
paths:
- '.github/workflows/build-ios.yml'
- 'ios/**'
- '*.podspec'
- 'example/ios/**'
pull_request:
paths:
- '.github/workflows/build-ios.yml'
- 'ios/**'
- '*.podspec'
- 'example/ios/**'
jobs:
build:
name: Build iOS Example App
runs-on: macOS-latest
defaults:
run:
working-directory: example/ios
steps:
- uses: actions/checkout@v4
- name: Install node
uses: actions/setup-node@v4
with:
node-version: 18
- name: Enable Corepack
run: corepack enable
- name: Setup xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: 16.4.0
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: |
if command -v yarn &> /dev/null; then
CACHE_DIR=$(yarn config get cacheFolder 2>/dev/null || yarn cache dir 2>/dev/null || echo "")
if [ -z "$CACHE_DIR" ]; then
CACHE_DIR="$HOME/.yarn/cache"
fi
else
CACHE_DIR="$HOME/.yarn/cache"
fi
echo "dir=$CACHE_DIR" >> $GITHUB_OUTPUT
- name: Restore node_modules from cache
uses: actions/cache@v5
id: yarn-cache
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
node_modules
example/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install node_modules for example/
run: yarn install --frozen-lockfile
- name: Setup Ruby (bundle)
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
working-directory: example
- name: Restore Pods cache
uses: actions/cache@v5
with:
path: |
example/ios/Pods
~/Library/Caches/CocoaPods
~/.cocoapods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Build App
run: |
bundle install
RCT_USE_RN_DEP=1 RCT_USE_PREBUILT_RNCORE=1 bundle exec pod install
xcodebuild build \
-workspace RNApp.xcworkspace \
-scheme RNApp \
-sdk iphonesimulator