feat: 배포 전 시뮬레이터 빌드를 선행하고 성공했을 때만 배포하도록 개선 및 qa-local-* 형태 태그를 붙였을 때는… #21
Workflow file for this run
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 TestFlight | |
| on: | |
| push: | |
| tags: | |
| - "qa-*" | |
| workflow_dispatch: | |
| env: | |
| SCHEME: DevLog | |
| RUBY_VERSION: "3.2" | |
| XCODE_VERSION: latest | |
| APP_STORE_TEAM_ID: ${{ secrets.APP_STORE_TEAM_ID }} | |
| ASC_KEY_ID: ${{ secrets.ASC_KEY_ID }} | |
| ASC_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }} | |
| ASC_KEY_PATH: fastlane/AuthKey.p8 | |
| SPACESHIP_CONNECT_API_IN_HOUSE: "false" | |
| MATCH_GIT_URL: ${{ secrets.MATCH_GIT_URL }} | |
| MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} | |
| MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }} | |
| permissions: | |
| contents: read | |
| jobs: | |
| validate: | |
| runs-on: macos-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: ${{ env.XCODE_VERSION }} | |
| - name: Cache SwiftPM | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.swiftpm | |
| ~/Library/Caches/org.swift.swiftpm | |
| ~/Library/Developer/Xcode/SourcePackages | |
| .spm | |
| key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} | |
| restore-keys: | | |
| ${{ runner.os }}-spm- | |
| - name: Validate Debug Simulator Build | |
| uses: ./.github/actions/ios-simulator-build | |
| with: | |
| scheme: ${{ env.SCHEME }} | |
| testflight: | |
| needs: validate | |
| runs-on: macos-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| bundler-cache: true | |
| ruby-version: ${{ env.RUBY_VERSION }} | |
| - name: Set up Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: ${{ env.XCODE_VERSION }} | |
| - name: Write App Store Connect API key | |
| env: | |
| ASC_KEY_CONTENT: ${{ secrets.ASC_KEY_CONTENT }} | |
| run: | | |
| printf '%s' "$ASC_KEY_CONTENT" | base64 -D > "$ASC_KEY_PATH" | |
| - name: Build for TestFlight | |
| run: bundle exec fastlane testflight_build_only | |
| - name: Skip TestFlight Upload for Local QA Tag | |
| if: github.event_name == 'push' && startsWith(github.ref_name, 'qa-local-') | |
| run: echo "Skipping TestFlight upload for local QA tag ${GITHUB_REF_NAME}" | |
| - name: Upload to TestFlight | |
| if: github.event_name != 'push' || !startsWith(github.ref_name, 'qa-local-') | |
| run: bundle exec fastlane upload_testflight_build |