fix: signing setting #225
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: CI Pipeline | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| release: | |
| runs-on: macos-latest | |
| steps: | |
| # 1. 코드 체크아웃 | |
| - uses: actions/checkout@v3 | |
| # 2. Xcode 설정 | |
| - name: Setup Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| # 3. Ruby & Bundler 설치 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: 3.1 | |
| - name: Install dependencies | |
| run: | | |
| gem install bundler | |
| bundle install --jobs 4 --retry 3 | |
| # 4. match 저장소 SSH 접근 준비 | |
| - name: Set up SSH access to match repo | |
| run: | | |
| mkdir -p ~/.ssh | |
| echo "${{ secrets.MATCH_SSH_KEY }}" > ~/.ssh/id_rsa | |
| chmod 600 ~/.ssh/id_rsa | |
| ssh-keyscan github.com >> ~/.ssh/known_hosts | |
| # 5. App Store Connect API Key 생성 | |
| - name: Generate Fastlane API Key files | |
| run: | | |
| mkdir -p fastlane | |
| echo "${{ secrets.FASTLANE_APPLE_API_KEY_CONTENT }}" \ | |
| | base64 --decode > fastlane/AuthKey.p8 | |
| cat <<EOF > fastlane/api_key.json | |
| { | |
| "key_id": "${{ secrets.FASTLANE_APPLE_API_KEY_KEY_ID }}", | |
| "issuer_id": "${{ secrets.FASTLANE_APPLE_API_KEY_ISSUER_ID }}", | |
| "key_filepath": "fastlane/AuthKey.p8" | |
| } | |
| EOF | |
| # 6. macOS 로그인 키체인 언락 | |
| - name: Unlock macOS login keychain | |
| run: | | |
| security unlock-keychain -p "$KEYCHAIN_PASSWORD" \ | |
| ~/Library/Keychains/login.keychain-db | |
| env: | |
| KEYCHAIN_PASSWORD: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }} | |
| # 7. 자동 코드 서명(Auto Signing) 비활성화 | |
| - name: disable automatic signing | |
| run: bundle exec fastlane disable_automatic_code_signing_lane | |
| # 8. Development 프로비저닝 다운로드 | |
| - name: match (development) | |
| run: bundle exec fastlane match development \ | |
| --readonly \ | |
| --api_key_path fastlane/api_key.json | |
| env: | |
| MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} | |
| MATCH_KEYCHAIN_PASSWORD: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }} | |
| # 9. App Store 프로비저닝 다운로드 | |
| - name: match (appstore) | |
| run: bundle exec fastlane match appstore \ | |
| --readonly \ | |
| --api_key_path fastlane/api_key.json | |
| env: | |
| MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} | |
| MATCH_KEYCHAIN_PASSWORD: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }} | |
| # 10. 프로젝트에 내려받은 프로파일 반영 | |
| - name: update code signing settings | |
| run: bundle exec fastlane run update_code_signing_settings \ | |
| project:"./BioLog.xcodeproj" \ | |
| target:"BioLog" \ | |
| provisioning_profile:"match AppStore com.Wook.BioLog" | |
| - name: update | |
| run: bundle exec fastlane update_code_signing_settings | |
| # 11. 아카이브 & IPA 생성 | |
| - name: build_app (archive) | |
| run: bundle exec fastlane run build_app \ | |
| scheme:"BioLog" \ | |
| configuration:"Release" \ | |
| clean:true \ | |
| export_method:"app-store" \ | |
| xcargs:"-allowProvisioningUpdates" | |
| # 12. 테스트 스킴 실행 (빌드된 아티팩트 재사용) | |
| - name: scan (run tests) | |
| run: bundle exec fastlane run scan \ | |
| scheme:"BioLogTests" \ | |
| test_without_building:true \ | |
| derived_data_path:"build" \ | |
| result_bundle:true \ | |
| output_directory:"fastlane/report" \ | |
| fail_build:false | |
| # 13. TestFlight 업로드 | |
| - name: pilot (upload to TestFlight) | |
| run: bundle exec fastlane run pilot \ | |
| api_key_path:"fastlane/api_key.json" \ | |
| ipa:"build/BioLog.ipa" | |
| # 14. 테스트 결과 업로드 | |
| - name: Upload test results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ios-test-results | |
| path: fastlane/report/**/*.xcresult |