chore: #74 에러 메시지 privacy 수정 (#78) #32
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: Deploy to Development Server | |
| on: | |
| push: | |
| branches: [dev] | |
| env: | |
| APP_NAME: ${{ vars.APP_NAME }} | |
| SCHEME_NAME: ${{ vars.SCHEME_NAME }} | |
| APP_IDENTIFIER: ${{ vars.APP_IDENTIFIER }} | |
| BASE_URL: ${{ secrets.BASE_URL }} | |
| KAKAO_NATIVE_APP_KEY: ${{ secrets.KAKAO_NATIVE_APP_KEY }} | |
| APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }} | |
| APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }} | |
| APP_STORE_CONNECT_API_KEY_CONTENT: ${{ secrets.APP_STORE_CONNECT_API_KEY_CONTENT }} | |
| MATCH_SSH_KEY: ${{ secrets.MATCH_SSH_KEY }} | |
| MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} | |
| KEYCHAIN_NAME: ${{ secrets.KEYCHAIN_NAME }} | |
| KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} | |
| DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-and-deploy: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: 16.4.0 | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.2.9' | |
| - name: Cache Gems | |
| uses: actions/cache@v4 | |
| with: | |
| path: vendor/bundle | |
| key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-gems- | |
| - name: Bundle Install | |
| run: bundle install --deployment --jobs 4 --retry 3 --path vendor/bundle | |
| - name: Set up SSH key for match | |
| run: | | |
| mkdir -p ~/.ssh | |
| echo "${MATCH_SSH_KEY}" > ~/.ssh/id_rsa | |
| chmod 600 ~/.ssh/id_rsa | |
| ssh-keyscan github.com >> ~/.ssh/known_hosts | |
| - name: Generate Config Files | |
| run: | | |
| echo "BASE_URL = ${{ env.BASE_URL }}" > BeforeGoing/Config.xcconfig | |
| echo "KAKAO_NATIVE_APP_KEY = ${{ env.KAKAO_NATIVE_APP_KEY }}" >> BeforeGoing/Config.xcconfig | |
| echo "Generated Config.xcconfig:" | |
| cat BeforeGoing/Config.xcconfig | |
| - name: Run Fastlane | |
| run: bundle exec fastlane beta | |
| notify: | |
| runs-on: ubuntu-latest | |
| needs: [build-and-deploy] | |
| if: always() | |
| steps: | |
| - name: Notify Success to Discord | |
| if: ${{ needs.build-and-deploy.result == 'success' }} | |
| uses: Ilshidur/action-discord@0.3.2 | |
| with: | |
| args: "A new iOS beta build has been uploaded to TestFlight 🚀" | |
| env: | |
| DISCORD_WEBHOOK: ${{ env.DISCORD_WEBHOOK }} | |
| DISCORD_EMBEDS: | | |
| [ | |
| { | |
| "author": { "name": "${{ github.actor }}" }, | |
| "title": "Deployment Succeeded", | |
| "description": "Branch: `${{ github.ref_name }}`\nWorkflow: [View on GitHub](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})", | |
| "color": 10478271, | |
| "fields": [ | |
| { "name": "App", "value": "${{ env.APP_NAME}}", "inline": true }, | |
| { "name": "Scheme", "value": "${{ env.SCHEME_NAME }}", "inline": true } | |
| ] | |
| } | |
| ] | |
| - name: Notify Failure to Discord | |
| if: ${{ needs.build-and-deploy.result != 'success' }} | |
| uses: Ilshidur/action-discord@0.3.2 | |
| with: | |
| args: "TestFlight deployment failed 😢" | |
| env: | |
| DISCORD_WEBHOOK: ${{ env.DISCORD_WEBHOOK }} | |
| DISCORD_EMBEDS: | | |
| [ | |
| { | |
| "author": { "name": "${{ github.actor }}" }, | |
| "title": "Deployment Failed", | |
| "description": "Branch: `${{ github.ref_name }}`\nWorkflow: [View on GitHub](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})", | |
| "color": 13458524, | |
| "fields": [ | |
| { "name": "App", "value": "${{ env.APP_NAME}}", "inline": true }, | |
| { "name": "Scheme", "value": "${{ env.SCHEME_NAME }}", "inline": true } | |
| ] | |
| } | |
| ] |