-
Notifications
You must be signed in to change notification settings - Fork 1
243 lines (222 loc) · 9.21 KB
/
Copy pathdeploy.yml
File metadata and controls
243 lines (222 loc) · 9.21 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
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
name: Neki-iOS 배포 및 버전 관리
on:
workflow_dispatch:
inputs:
operation:
description: 실행할 작업
required: true
type: choice
options:
- Neki-dev 연결 검증
- Neki-iOS 연결 검증
- Neki-iOS & Dev 연결 검증
- Neki-dev TestFlight 업로드
- Neki-iOS TestFlight 업로드
- Neki-iOS & Dev TestFlight 업로드
- Neki-iOS App Store 심사 제출
- Neki-dev TestFlight + Neki-iOS App Store 심사 제출
- Neki-dev 서버 업데이트 정책만 적용
- Neki-iOS 서버 업데이트 정책만 적용
- Neki-iOS & Dev 서버 업데이트 정책만 적용
development_version:
description: Neki-dev 버전(대상이 아니면 빈칸)
required: false
type: string
production_version:
description: Neki-iOS 버전(대상이 아니면 빈칸)
required: false
type: string
release_notes:
description: TestFlight 및 App Store 선택 입력인 변경사항
required: false
type: string
update_policy:
description: 배포와 별개로 적용할 서버 버전 정책
required: true
default: 변경 안 함
type: choice
options:
- 변경 안 함
- 권장 업데이트
- 강제 업데이트
production_version_is_live:
description: Neki-iOS 정책 적용 시, 해당 버전이 App Store에 공개됨을 확인
required: false
default: false
type: boolean
permissions:
contents: read
concurrency:
group: ios-delivery
cancel-in-progress: false
jobs:
prepare:
name: 입력 검증
runs-on: ubuntu-latest
timeout-minutes: 5
outputs:
delivery_mode: ${{ steps.resolve.outputs.delivery_mode }}
development_distribution_destination: ${{ steps.resolve.outputs.development_distribution_destination }}
production_distribution_destination: ${{ steps.resolve.outputs.production_distribution_destination }}
update_policy: ${{ steps.resolve.outputs.update_policy }}
run_delivery: ${{ steps.resolve.outputs.run_delivery }}
run_version_policy: ${{ steps.resolve.outputs.run_version_policy }}
run_development: ${{ steps.resolve.outputs.run_development }}
run_production: ${{ steps.resolve.outputs.run_production }}
target_app: ${{ steps.resolve.outputs.target_app }}
target_versions: ${{ steps.resolve.outputs.target_versions }}
steps:
- name: Checkout repository
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
with:
persist-credentials: false
- name: 작업 조합 검증
id: resolve
env:
OPERATION: ${{ inputs.operation }}
DEVELOPMENT_VERSION: ${{ inputs.development_version }}
PRODUCTION_VERSION: ${{ inputs.production_version }}
UPDATE_POLICY_INPUT: ${{ inputs.update_policy }}
PRODUCTION_VERSION_IS_LIVE: ${{ inputs.production_version_is_live }}
run: scripts/ci/resolve_delivery.sh
development_delivery:
name: Neki-dev ${{ inputs.operation }}
needs: prepare
if: needs.prepare.outputs.run_development == 'true' && needs.prepare.outputs.run_delivery == 'true'
runs-on: macos-latest
timeout-minutes: 90
environment: development
steps:
- name: Checkout repository
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
with:
persist-credentials: false
- name: Neki-dev 검증 및 배포
uses: ./.github/actions/deliver-app
with:
deployment_target: development
app_version: ${{ inputs.development_version }}
delivery_mode: ${{ needs.prepare.outputs.delivery_mode }}
distribution_destination: ${{ needs.prepare.outputs.development_distribution_destination }}
release_notes: ${{ inputs.release_notes }}
build_xcconfig: ${{ secrets.BUILD_XCCONFIG }}
firebase_plist: ${{ secrets.FIREBASE_PLIST }}
match_github_client_id: ${{ secrets.MATCH_GITHUB_CLIENT_ID }}
match_github_app_private_key: ${{ secrets.MATCH_GITHUB_APP_PRIVATE_KEY }}
asc_key_id: ${{ secrets.ASC_KEY_ID }}
asc_issuer_id: ${{ secrets.ASC_ISSUER_ID }}
asc_key_content: ${{ secrets.ASC_KEY_CONTENT }}
match_password: ${{ secrets.MATCH_PASSWORD }}
production_delivery:
name: Neki-iOS ${{ inputs.operation }}
needs: prepare
if: needs.prepare.outputs.run_production == 'true' && needs.prepare.outputs.run_delivery == 'true'
runs-on: macos-latest
timeout-minutes: 90
environment: production
steps:
- name: Checkout repository
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
with:
persist-credentials: false
- name: Neki-iOS 검증 및 배포
uses: ./.github/actions/deliver-app
with:
deployment_target: production
app_version: ${{ inputs.production_version }}
delivery_mode: ${{ needs.prepare.outputs.delivery_mode }}
distribution_destination: ${{ needs.prepare.outputs.production_distribution_destination }}
release_notes: ${{ inputs.release_notes }}
build_xcconfig: ${{ secrets.BUILD_XCCONFIG }}
firebase_plist: ${{ secrets.FIREBASE_PLIST }}
match_github_client_id: ${{ secrets.MATCH_GITHUB_CLIENT_ID }}
match_github_app_private_key: ${{ secrets.MATCH_GITHUB_APP_PRIVATE_KEY }}
asc_key_id: ${{ secrets.ASC_KEY_ID }}
asc_issuer_id: ${{ secrets.ASC_ISSUER_ID }}
asc_key_content: ${{ secrets.ASC_KEY_CONTENT }}
match_password: ${{ secrets.MATCH_PASSWORD }}
development_version_policy:
name: Neki-dev 서버 버전 정책
needs:
- prepare
- development_delivery
if: >-
always() &&
needs.prepare.result == 'success' &&
needs.prepare.outputs.run_development == 'true' &&
needs.prepare.outputs.run_version_policy == 'true' &&
(needs.prepare.outputs.run_delivery == 'false' || needs.development_delivery.result == 'success')
runs-on: ubuntu-latest
timeout-minutes: 5
environment: development
steps:
- name: Checkout repository
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
with:
persist-credentials: false
- name: Neki-dev 서버 버전 정책 반영 및 검증
env:
APP_VERSION_API_ADDRESS: ${{ secrets.APP_VERSION_API_ADDRESS }}
APP_VERSION: ${{ inputs.development_version }}
UPDATE_POLICY: ${{ needs.prepare.outputs.update_policy }}
run: scripts/ci/update_app_version.sh
production_version_policy:
name: Neki-iOS 서버 버전 정책
needs:
- prepare
- production_delivery
if: >-
always() &&
needs.prepare.result == 'success' &&
needs.prepare.outputs.run_production == 'true' &&
needs.prepare.outputs.run_version_policy == 'true' &&
(needs.prepare.outputs.run_delivery == 'false' || needs.production_delivery.result == 'success')
runs-on: ubuntu-latest
timeout-minutes: 5
environment: production
steps:
- name: Checkout repository
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
with:
persist-credentials: false
- name: Neki-iOS 서버 버전 정책 반영 및 검증
env:
APP_VERSION_API_ADDRESS: ${{ secrets.APP_VERSION_API_ADDRESS }}
APP_VERSION: ${{ inputs.production_version }}
UPDATE_POLICY: ${{ needs.prepare.outputs.update_policy }}
run: scripts/ci/update_app_version.sh
notify:
name: Discord 결과 알림
needs:
- prepare
- development_delivery
- production_delivery
- development_version_policy
- production_version_policy
if: always()
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout repository
uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
with:
persist-credentials: false
- name: 단계별 결과 전송
continue-on-error: true
env:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }}
OPERATION: ${{ inputs.operation }}
TARGET_APP: ${{ needs.prepare.outputs.target_app }}
UPDATE_POLICY_INPUT: ${{ inputs.update_policy }}
RELEASE_NOTES: ${{ inputs.release_notes }}
TARGET_VERSIONS: ${{ needs.prepare.outputs.target_versions }}
RUN_DELIVERY: ${{ needs.prepare.outputs.run_delivery }}
RUN_VERSION_POLICY: ${{ needs.prepare.outputs.run_version_policy }}
RUN_DEVELOPMENT: ${{ needs.prepare.outputs.run_development }}
RUN_PRODUCTION: ${{ needs.prepare.outputs.run_production }}
PREPARE_RESULT: ${{ needs.prepare.result }}
DEVELOPMENT_DELIVERY_RESULT: ${{ needs.development_delivery.result }}
PRODUCTION_DELIVERY_RESULT: ${{ needs.production_delivery.result }}
DEVELOPMENT_POLICY_RESULT: ${{ needs.development_version_policy.result }}
PRODUCTION_POLICY_RESULT: ${{ needs.production_version_policy.result }}
run: scripts/ci/send_delivery_notification.sh