-
Notifications
You must be signed in to change notification settings - Fork 3
74 lines (62 loc) · 2.17 KB
/
ios-ci.yml
File metadata and controls
74 lines (62 loc) · 2.17 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: iOS CI Build
# Manual build or tag-triggered release build.
# PR quality checks (lint, tests, type-check) live in ci.yml.
on:
workflow_dispatch:
push:
tags:
- 'v*'
concurrency:
group: ios-${{ github.ref }}
cancel-in-progress: true
jobs:
ios-build:
runs-on: macos-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: npm
- name: Install dependencies
run: npm ci
- name: Cache CocoaPods specs
uses: actions/cache@v4
with:
path: ~/.cocoapods
key: cocoapods-${{ hashFiles('ios/Podfile.lock') }}
restore-keys: cocoapods-
- name: Install Pods
run: cd ios && pod install
- name: Seed .env for build
run: cp .env.example .env
# Simulator / CI build (no signing required).
# For a real device/TestFlight build, switch to -configuration Release,
# add code signing setup (e.g. Fastlane match or manual cert import),
# and change -destination to 'generic/platform=iOS'.
- name: Build iOS (Simulator)
run: |
cd ios
xcodebuild \
-workspace ReactNativeStarter.xcworkspace \
-scheme ReactNativeStarter \
-configuration Debug \
-sdk iphonesimulator \
-destination 'generic/platform=iOS Simulator' \
-derivedDataPath build \
build
# Upload Sentry source maps if DSN is configured.
# Uncomment and set SENTRY_AUTH_TOKEN + SENTRY_ORG + SENTRY_PROJECT secrets.
# - name: Upload Sentry source maps
# env:
# SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
# SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
# SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
# run: npx @sentry/cli releases files "${{ github.ref_name }}" upload-sourcemaps ios/build
- name: Upload Simulator app
uses: actions/upload-artifact@v4
with:
name: ios-simulator-app
path: ios/build/Build/Products/Debug-iphonesimulator/ReactNativeStarter.app