-
Notifications
You must be signed in to change notification settings - Fork 1
110 lines (92 loc) · 3.25 KB
/
build-ios-dev.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
name: IOS Build
run-name: IOS Build for ${{ inputs.brand }} on ${{github.ref_name}}
on:
workflow_dispatch:
inputs:
brand:
description: 'Brand to publish'
required: true
default: 'cozy'
type: choice
options:
- cozy
- mabulle
jobs:
ios-build:
name: IOS Build
runs-on: macos-latest
steps:
- name: List Xcode installations
run: sudo ls -1 /Applications | grep "Xcode"
- name: Select Xcode 15.3
run: sudo xcode-select -s /Applications/Xcode_15.3.app/Contents/Developer
- name: Check out Git repository
uses: actions/checkout@v3
- name: Set NodeJS version
uses: actions/setup-node@v3
with:
node-version: 16
- name: Setup Ruby (bundle)
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.6
bundler-cache: true
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Restore node_modules from cache
uses: actions/cache@v3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Restore Pods cache
uses: actions/cache@v3
with:
path: |
ios/Pods
~/Library/Caches/CocoaPods
~/.cocoapods
key: ${{ runner.os }}-pods-${{ hashFiles('ios/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Install dependencies
run: yarn install --frozen-lockfile --network-timeout 300000
- name: 'Create env file'
run: |
touch .env
- name: Set white label brand
run: yarn brand:configure:${{ inputs.brand }} --force
- name: Install Pods
run: cd ios && pod install --repo-update && cd ..
- name: Build IOS App
id: ios_build
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
uses: yukiarrr/ios-build-action@v1.5.0
with:
project-path: ios/CozyReactNative.xcodeproj
p12-base64: ${{ secrets.IOS_P12_BASE64 }}
export-options: ios/options-dev.plist
mobileprovision-base64: |
${{ secrets[format('{0}_IOS_MOBILE_PROVISION_HADOC_BASE64', inputs.brand)] }}
${{ secrets[format('{0}_SHARE_IOS_MOBILE_PROVISION_HADOC_BASE64', inputs.brand)] }}
code-signing-identity: 'iPhone Distribution'
team-id: ${{ secrets.IOS_TEAM_ID }}
certificate-password: ${{ secrets.IOS_CERTIFICATE_PASSWORD }}
workspace-path: ios/CozyReactNative.xcworkspace
scheme: CozyReactNative
export-method: ad-hoc
- name: Upload artifact to GitHub
uses: actions/upload-artifact@v3
with:
name: iOS App Store Package
path: 'output.ipa'
- name: Upload XCode error logs
uses: actions/upload-artifact@v3
if: always() && steps.ios_build.outcome == 'failure'
with:
name: XCode Build Logs
path: '/Users/runner/Library/Logs/gym/CozyReactNative-CozyReactNative.log'