Repository navigation
72 lines (59 loc) · 2.42 KB
/
Copy pathdeploy-release.yml
File metadata and controls
72 lines (59 loc) · 2.42 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
name: Deploy Release (App Store upload)
on:
push:
branches: [main]
# 빌드 번호 커밋을 push하기 위한 쓰기 권한.
# GITHUB_TOKEN push는 워크플로우를 재트리거하지 않으므로 [skip ci]와 이중으로 루프를 차단한다.
permissions:
contents: write
concurrency:
group: deploy-release
cancel-in-progress: false
jobs:
deploy:
runs-on: macos-15
steps:
- uses: actions/checkout@v4
# 로컬 빌드 Xcode는 26.2. 러너 이미지에 26.2가 없으면 첫 실행에서 조정한다.
- name: Select Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '26.2'
- name: Setup Tuist (mise)
uses: jdx/mise-action@v2
- name: Setup Ruby & bundler
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4'
bundler-cache: true
# xcconfig·서명 자산(인증서·API Key)은 Livith-Certificate 저장소에서 직접 당겨온다.
# 값이 바뀌어도 Livith-Certificate만 갱신하면 되고 GitHub Secret은 손대지 않는다.
- name: Checkout Livith-Certificate
uses: actions/checkout@v4
with:
repository: mediunn/Livith-Certificate
token: ${{ secrets.CERT_REPO_PAT }}
path: .certificate
# cloud signing(-allowProvisioningUpdates + Admin API Key)이 프로파일을 자동 생성하므로
# 수동 프로비저닝 프로파일 복사는 제거했다(decisions #10).
- name: Install xcconfig
run: |
mkdir -p Tuist/Config
cp .certificate/Config/*.xcconfig Tuist/Config/
# 인증서(.p12)도 Livith-Certificate에서 당겨와 임시 키체인에 import한다. 개인키 암호만 Secret.
- name: Import distribution certificate
env:
P12_PASSWORD: ${{ secrets.DIST_CERT_PASSWORD }}
run: |
KEYCHAIN=build.keychain
security create-keychain -p "" "$KEYCHAIN"
security default-keychain -s "$KEYCHAIN"
security unlock-keychain -p "" "$KEYCHAIN"
security import .certificate/P12/distribution.p12 -k "$KEYCHAIN" -P "$P12_PASSWORD" -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple: -s -k "" "$KEYCHAIN"
- name: Tuist install
run: tuist install
- name: Tuist generate
run: tuist generate --no-open
- name: Fastlane release
run: bundle exec fastlane release