ref: Remove v9 checks for debug image provider #3642
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: Upload to Testflight | |
on: | |
push: | |
branches: | |
- main | |
- release/** | |
pull_request: | |
workflow_dispatch: | |
# Concurrency configuration: | |
# - We use workflow-specific concurrency groups to prevent multiple TestFlight uploads of the same build, | |
# as these operations involve app building, signing, and upload to Apple's servers. | |
# - For pull requests, we cancel in-progress runs when testing workflow changes since only the | |
# latest configuration needs validation before merging. | |
# - For main branch pushes (actual uploads), we never cancel uploads to ensure every main branch | |
# commit gets properly built and distributed to TestFlight for testing by our team. | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
jobs: | |
files-changed: | |
name: Detect File Changes | |
runs-on: ubuntu-latest | |
outputs: | |
run_testflight_for_changes: ${{ github.event_name == 'pull_request' && steps.changes.outputs.run_testflight_for_prs || steps.changes.outputs.run_testflight_for_pushes }} | |
steps: | |
- uses: actions/checkout@v5 | |
- name: Get changed files | |
id: changes | |
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | |
with: | |
token: ${{ github.token }} | |
filters: .github/file-filters.yml | |
upload_to_testflight: | |
if: needs.files-changed.outputs.run_testflight_for_changes == 'true' | |
needs: files-changed | |
name: Build and Upload iOS-Swift to Testflight | |
runs-on: macos-15 | |
steps: | |
- uses: actions/checkout@v5 | |
- run: ./scripts/ci-select-xcode.sh 16.4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- run: make init-ci-build | |
- run: make xcode-ci | |
# We upload a new version to TestFlight on every commit on main | |
# So we need to bump the build number each time | |
- name: Bump Build Version | |
env: | |
FASTLANE_BUILD_NUMBER: ${{ github.run_number }} | |
run: bundle exec fastlane bump_build_number | |
- name: Remove preview version suffixes | |
run: bundle exec fastlane remove_preview_version_suffixes | |
- name: Run Fastlane | |
env: | |
APP_STORE_CONNECT_KEY_ID: ${{ secrets.APP_STORE_CONNECT_KEY_ID }} | |
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_ISSUER_ID }} | |
APP_STORE_CONNECT_KEY: ${{ secrets.APP_STORE_CONNECT_KEY }} | |
FASTLANE_BUNDLE_VERSION: ${{ github.run_number }} | |
FASTLANE_KEYCHAIN_PASSWORD: ${{ secrets.FASTLANE_KEYCHAIN_PASSWORD }} | |
MATCH_GIT_PRIVATE_KEY: ${{ secrets.MATCH_GIT_PRIVATE_KEY }} | |
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} | |
MATCH_USERNAME: ${{ secrets.MATCH_USERNAME }} | |
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | |
run: | | |
bundle exec fastlane build_ios_swift | |
bundle exec fastlane ios_swift_to_testflight | |
- name: Archiving | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dSYMs | |
path: | | |
${{ github.workspace }}/iOS-Swift.* | |
${{ github.workspace }}/*.dSYM.zip | |
${{ github.workspace }}/dSYMs/ | |
- name: Run CI Diagnostics | |
if: failure() | |
run: ./scripts/ci-diagnostics.sh | |
# This check validates that either upload_to_testflight passed or was skipped, which allows us | |
# to make testflight a required check with only running the upload_to_testflight when required. | |
# So, we don't have to run upload_to_testflight, for example, for unrelated changes. | |
testflight-required-check: | |
needs: | |
[ | |
files-changed, | |
upload_to_testflight, | |
] | |
name: Testflight | |
# This is necessary since a failed/skipped dependent job would cause this job to be skipped | |
if: always() | |
runs-on: ubuntu-latest | |
steps: | |
# If any jobs we depend on fails gets cancelled or times out, this job will fail. | |
# Skipped jobs are not considered failures. | |
- name: Check for failures | |
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') | |
run: | | |
echo "One of the testflight jobs has failed." && exit 1 |