fix(ci): Skip Java, Gradle, and replay-stubs for iOS E2E jobs (#6353) #1663
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 | |
| pull_request: | |
| paths: | |
| - ".github/workflows/testflight.yml" | |
| jobs: | |
| diff_check: | |
| uses: ./.github/workflows/skip-ci.yml | |
| upload_to_testflight: | |
| name: Build and Upload React Native Sample to Testflight on ${{matrix.runner_provider}} | |
| runs-on: ${{ matrix.runner_provider == 'bitrise' && fromJSON('["bitrise_pool_name:tahoe"]') || fromJSON('["ghcr.io/cirruslabs/macos-tahoe-xcode:26.2.0", "runner_group_id:10"]') }} | |
| continue-on-error: ${{ matrix.runner_provider == 'bitrise' }} | |
| needs: [diff_check] | |
| if: ${{ needs.diff_check.outputs.skip_ci != 'true' }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # Only run on Cirrus for now, because we would upload twice to Testflight with the same build number | |
| runner_provider: ["cirrus"] | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - uses: actions/cache@v4 | |
| name: Cache Ruby | |
| if: matrix.runner_provider != 'bitrise' | |
| with: | |
| path: | | |
| ~/.rbenv/versions | |
| ~/.rbenv/cache | |
| key: ruby-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.ruby-version') }} | |
| - uses: actions/cache@v4 | |
| name: Cache Ruby (Bitrise) | |
| if: matrix.runner_provider == 'bitrise' | |
| with: | |
| path: ~/.asdf/installs/ruby | |
| key: asdf-ruby-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.ruby-version') }} | |
| - name: Install Ruby (Bitrise) | |
| if: matrix.runner_provider == 'bitrise' | |
| working-directory: samples/react-native | |
| run: | | |
| asdf install ruby 3.3.0 | |
| asdf local ruby 3.3.0 | |
| bundle install | |
| - uses: ruby/setup-ruby@9eb537ca036ebaed86729dcb9309076e4c5c3b74 # v1 | |
| if: matrix.runner_provider != 'bitrise' | |
| with: | |
| working-directory: samples/react-native | |
| ruby-version: "3.3.0" # based on what is used in the sample | |
| bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
| cache-version: 1 # cache the installed gems | |
| - run: corepack enable | |
| - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6 | |
| with: | |
| package-manager-cache: false | |
| node-version: 22 | |
| cache: "yarn" | |
| cache-dependency-path: yarn.lock | |
| - name: Setup asdf Node.js (Bitrise) | |
| if: matrix.runner_provider == 'bitrise' | |
| run: | | |
| asdf global nodejs system | |
| corepack enable | |
| - name: Install Dependencies | |
| run: | | |
| yarn install | |
| cd samples/react-native && yarn install | |
| - name: Build SDK | |
| run: yarn build | |
| # We upload a new version to TestFlight on every commit on main | |
| # So we need to bump the build number each time | |
| - name: Set Build Number | |
| working-directory: samples/react-native | |
| run: yarn set-build-number ${{ github.run_number }} | |
| - name: Pod Install | |
| working-directory: samples/react-native/ios | |
| run: PRODUCTION=1 bundle exec pod install | |
| - name: Run Fastlane | |
| working-directory: samples/react-native | |
| 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_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 }} | |
| SENTRY_LOG_LEVEL: DEBUG | |
| SENTRY_CLI_EXTRA_ARGS: "--force-foreground" | |
| # Fix for Xcode 26+ with MetalToolchain: use default Xcode toolchain to avoid | |
| # missing Swift compatibility libraries (swiftCompatibility56, etc.) | |
| # See: https://github.com/actions/runner-images/issues/13135 | |
| TOOLCHAINS: com.apple.dt.toolchain.XcodeDefault | |
| run: | | |
| bundle exec fastlane ios build_react_native_sample | |
| bundle exec fastlane ios upload_react_native_sample_to_testflight | |
| - name: Upload Xcode Archive | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: sentry-react-native-sample-xcode-archive-for-testflight-${{ matrix.runner_provider }} | |
| path: samples/react-native/sentryreactnativesample.xcarchive | |
| retention-days: 1 |