This repository has been archived by the owner on Nov 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 46
167 lines (137 loc) · 4.67 KB
/
ios_ui_release.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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
#
# Copyright (c) 2020 INESC TEC <https://www.inesctec.pt>
#
# This Source Code Form is subject to the terms of the European Union
# Public License, v. 1.2. If a copy of the EUPL was not distributed with
# this file, You can obtain one at https://opensource.org/licenses/EUPL-1.2.
#
# SPDX-License-Identifier: EUPL-1.2
#
name: iOS UI Release Build
on:
push:
tags:
- "*"
env:
DEVELOPER_DIR: /Applications/Xcode_12.3.app
RCT_NO_LAUNCH_PACKAGER: true
jobs:
test:
runs-on: macos-latest
if: "!contains(github.event.head_commit.message, '[skip-ci]')"
steps:
- name: Switch to Xcode 12.3
run: sudo xcode-select --switch /Applications/Xcode_12.3.app
- uses: actions/checkout@v2
with:
fetch-depth: 1
- uses: actions/setup-node@v1
with:
node-version: "10"
- name: Get node cache directory path
id: node-cache-dir
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: node-cache
name: Cache node dependencies
with:
path: ${{ steps.node-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-node-
- uses: actions/cache@v2
id: pods-cache
name: Cache pods dependencies
with:
path: ios/Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: ${{ runner.os }}-pods-
- name: Install node dependencies
run: yarn --ignore-scripts --no-audit --prefer-offline --frozen-lockfileyarn --ignore-scripts --frozen-lockfile
- name: Install pods dependencies
run: |
cd ios
gem update cocoapods xcodeproj
pod install
- name: Run unit tests
run: yarn test:unit
- name: Run integration tests
run: yarn test:integration
- name: Run components tests
run: yarn test:components
build:
runs-on: macos-latest
needs: test
steps:
- name: Switch to Xcode 12.3
run: sudo xcode-select --switch /Applications/Xcode_12.3.app
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Setup bundler
run: |
cd ios
bundle update --bundler
- uses: actions/setup-node@v1
with:
node-version: "10"
- name: Get node cache directory path
id: node-cache-dir
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: node-cache
name: Cache node dependencies
with:
path: ${{ steps.node-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-node-
- uses: actions/cache@v2
id: pods-cache
name: Cache pods dependencies
with:
path: ios/Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: ${{ runner.os }}-pods-
- name: Install node dependencies
run: yarn --ignore-scripts --no-audit --prefer-offline --frozen-lockfileyarn --ignore-scripts --frozen-lockfile
- name: Install pods dependencies
run: |
cd ios
gem update cocoapods xcodeproj
pod install
- name: Setup environment
run: |
echo "${{secrets.ENV_UI_RELEASE}}" > .env.ui.release
- name: Build IPA
env:
MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }}
MATCH_GIT_BRANCH: "master"
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
MATCH_TYPE: "adhoc"
APP_PROFILE: "AdHoc"
APP_IDENTIFIER: "fct.inesctec.stayaway.ui"
APP_SCHEME: "Divoc.ui.release"
APP_CONFIGURATION: "UiRelease"
CODE_SIGN_IDENTITY: "iPhone Distribution"
FASTLANE_TEAM_ID: ${{ secrets.TEAM_ID }}
FASTLANE_EXPORT_METHOD: "ad-hoc"
run: |
cd ios
bundle exec fastlane build_and_sign
- name: SHA256
run: shasum -a 256 ios/build/stayaway.ipa
- name: Upload IPA file
uses: actions/upload-artifact@v2
with:
name: app-ui-release.ipa
path: ios/build/stayaway.ipa
- name: Upload Archive xcarchive (incl symbols) files
uses: actions/upload-artifact@v2
with:
name: app-ui-release.xcarchive
path: ios/build/stayaway.xcarchive
- name: Upload log file
uses: actions/upload-artifact@v2
with:
name: app-ui-release.log
path: ios/build/build.log