Skip to content

Commit 99029c3

Browse files
authored
[Setting] 앱스토어 커넥트 배포 자동화 결과 알림 디스코드 연동 테스트
2 parents 84f1b69 + 60d8c95 commit 99029c3

File tree

1 file changed

+27
-7
lines changed

1 file changed

+27
-7
lines changed

.github/workflows/release.yml

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
name: iOS Release CI
22

3-
# 세팅 완료될때까지 임시로 develop에서 진행
43
on:
54
push:
65
branches:
@@ -22,32 +21,38 @@ jobs:
2221
- name: Select Xcode
2322
uses: maxim-lobanov/setup-xcode@v1
2423
with:
25-
xcode-version: '26.2'
24+
xcode-version: '26.2'
2625

27-
# 2. SPM 매크로 지문 검증 우회 (빌드 안정성 확보)
26+
# 2. 깃허브 Secret에서 Release.xcconfig 파일 생성하기
27+
- name: Create Release.xcconfig
28+
run: |
29+
mkdir -p APP/Sources/Resources
30+
echo "${{ secrets.RELEASE_XCCONFIG }}" > APP/Sources/Resources/Release.xcconfig
31+
32+
# 3. SPM 매크로 지문 검증 우회
2833
- name: Disable Macro Validation
2934
run: |
3035
defaults write com.apple.dt.Xcode IDESkipMacroFingerprintValidation -bool YES
3136
defaults write com.apple.dt.Xcode IDESkipPackagePluginFingerprintValidation -bool YES
3237
33-
# 3. SPM 의존성 사전 해결
38+
# 4. SPM 의존성 사전 해결
3439
- name: Resolve SPM Dependencies
3540
run: xcodebuild -resolvePackageDependencies -project ./Neki-iOS.xcodeproj -scheme Neki-iOS
3641

37-
# 4. Match 인증서 저장소 접근을 위한 SSH 세팅
42+
# 5. Match 인증서 저장소 접근을 위한 SSH 세팅
3843
- name: Install SSH key for Match
3944
uses: webfactory/ssh-agent@v0.8.0
4045
with:
4146
ssh-private-key: ${{ secrets.MATCH_SSH_KEY }}
4247

43-
# 5. Ruby 및 Fastlane 세팅 (Gemfile 활용)
48+
# 6. Ruby 및 Fastlane 세팅 (Gemfile 활용)
4449
- name: Setup Ruby and Install Gems
4550
uses: ruby/setup-ruby@v1
4651
with:
4752
ruby-version: '3.2'
4853
bundler-cache: true
4954

50-
# 6. Fastlane 배포 실행
55+
# 7. Fastlane 배포 실행
5156
- name: Run Fastlane Release
5257
run: bundle exec fastlane release
5358
env:
@@ -59,3 +64,18 @@ jobs:
5964
ASC_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }}
6065
ASC_KEY_CONTENT: ${{ secrets.ASC_KEY_CONTENT }}
6166
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
67+
68+
# 8. Discord 결과 알림 (성공/실패 여부 전송)
69+
- name: Send Discord notification
70+
if: always() # 빌드 성공/실패 여부와 상관없이 무조건 실행
71+
run: |
72+
if [ "${{ job.status }}" == "success" ]; then
73+
STATUS="✅ [Neki-iOS] release 브랜치 App Store Connect 배포 성공 🚀"
74+
else
75+
STATUS="❌ [Neki-iOS] release 브랜치 App Store Connect 배포 실패 😭"
76+
fi
77+
PAYLOAD=$(jq -n --arg content "$STATUS (${{ github.repository }})" '{content: $content}')
78+
curl -H "Content-Type: application/json" \
79+
-X POST \
80+
-d "$PAYLOAD" \
81+
${{ secrets.DISCORD_WEBHOOK_URL }}

0 commit comments

Comments
 (0)