-
Notifications
You must be signed in to change notification settings - Fork 65
54 lines (48 loc) · 1.45 KB
/
build-ios.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
name: Test iOS build
on:
pull_request:
paths:
- .github/workflows/ios-build.yml
- Example/package.json
- Example/ios/**
merge_group:
branches:
- main
push:
# commented due to test purposes
# branches:
# - main
# paths:
# - .github/workflows/ios-build.yml
# - Example/package.json
# - Example/ios/**
jobs:
build_ios:
runs-on: macos-12
strategy:
matrix: {dir: [Example]}
steps:
- name: Check out Git repository
uses: actions/checkout@v3
- name: Install app node_modules
working-directory: ${{ matrix.dir }}
run: yarn install --frozen-lockfile
- name: Restore Pods from cache
uses: actions/cache@v3
with:
path: |
${{ matrix.dir }}/ios/Pods
~/Library/Caches/CocoaPods
~/.cocoapods
key: ${{ runner.os }}-pods-${{ matrix.dir }}-${{ hashFiles(format('{0}/ios/Podfile.lock', matrix.dir)) }}
- name: Install Pods
working-directory: ${{ matrix.dir }}/ios
run: pod install
- name: Restore build artifacts from cache
uses: actions/cache@v3
with:
path: ~/Library/Developer/Xcode/DerivedData
key: ${{ runner.os }}-ios-derived-data-${{ matrix.dir }}-${{ hashFiles(format('{0}/ios/Podfile.lock', matrix.dir)) }}
- name: Build app
working-directory: ${{ matrix.dir }}
run: npx react-native run-ios