Update release.yml #17
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: iOS Release CI | |
| on: | |
| push: | |
| branches: | |
| - release | |
| concurrency: | |
| group: build-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| # 1. Xcode 버전 명시적 설정 | |
| - name: Select Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: '26.2' | |
| # 2. 깃허브 Secret에서 Release.xcconfig 파일 생성하기 | |
| - name: Create Release.xcconfig | |
| run: | | |
| mkdir -p APP/Sources/Resources | |
| printf "%s" "${{ secrets.RELEASE_XCCONFIG }}" > Configs/Release.xcconfig | |
| # 3. SPM 매크로 지문 검증 우회 | |
| - name: Disable Macro Validation | |
| run: | | |
| defaults write com.apple.dt.Xcode IDESkipMacroFingerprintValidation -bool YES | |
| defaults write com.apple.dt.Xcode IDESkipPackagePluginFingerprintValidation -bool YES | |
| # 4. SPM 의존성 사전 해결 | |
| - name: Resolve SPM Dependencies | |
| run: xcodebuild -resolvePackageDependencies -project ./Neki-iOS.xcodeproj -scheme Neki-iOS | |
| # 5. Match 인증서 저장소 접근을 위한 SSH 세팅 | |
| - name: Install SSH key for Match | |
| uses: webfactory/ssh-agent@v0.8.0 | |
| with: | |
| ssh-private-key: ${{ secrets.MATCH_SSH_KEY }} | |
| # 6. Ruby 및 Fastlane 세팅 (Gemfile 활용) | |
| - name: Setup Ruby and Install Gems | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.2' | |
| bundler-cache: true | |
| # 7. Fastlane 배포 실행 | |
| - name: Run Fastlane Release | |
| run: bundle exec fastlane release | |
| env: | |
| APP_IDENTIFIER: ${{ secrets.APP_IDENTIFIER }} | |
| APPLE_ID: ${{ secrets.APPLE_ID }} | |
| TEAM_ID: ${{ secrets.TEAM_ID }} | |
| FASTLANE_ITC_TEAM_ID: ${{ secrets.FASTLANE_ITC_TEAM_ID }} | |
| 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 }} | |
| # 8. Discord 결과 알림 (성공/실패 여부 전송) | |
| - name: Send Discord notification | |
| if: always() # 빌드 성공/실패 여부와 상관없이 무조건 실행 | |
| run: | | |
| if [ "${{ job.status }}" == "success" ]; then | |
| STATUS="✅ [Neki-iOS] release 브랜치 App Store Connect 배포 성공 🚀" | |
| else | |
| STATUS="❌ [Neki-iOS] release 브랜치 App Store Connect 배포 실패 😭" | |
| fi | |
| PAYLOAD=$(jq -n --arg content "$STATUS (${{ github.repository }})" '{content: $content}') | |
| curl -H "Content-Type: application/json" \ | |
| -X POST \ | |
| -d "$PAYLOAD" \ | |
| ${{ secrets.DISCORD_WEBHOOK_URL }} |