Merge branch 'main' into test/temp-nightly #7
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: Nightly Build | |
| # Triggered by every push to chore/temp-nightly (which nightly-temp-branch-sync.yml | |
| # force-pushes daily at 4 AM UTC to match main). | |
| # Temporarily now this is pointing to test/temp-nightly instead of chore/temp-nightly. | |
| # | |
| # [skip ci] commits (e.g. version bumps pushed via update-latest-build-version.yml) | |
| # are automatically skipped by GitHub Actions, so this workflow will NOT | |
| # double-trigger on those commits. | |
| on: | |
| push: | |
| branches: | |
| - test/temp-nightly | |
| workflow_dispatch: | |
| # contents: write required by build.yml update-build-version job (version bump commit push) | |
| permissions: | |
| contents: write | |
| id-token: write | |
| jobs: | |
| bump-version: | |
| name: Bump build version | |
| uses: ./.github/workflows/update-latest-build-version.yml | |
| permissions: | |
| contents: write | |
| id-token: write | |
| with: | |
| base-branch: ${{ github.ref_name }} | |
| secrets: inherit | |
| build-exp: | |
| name: Nightly exp build (main-exp) | |
| needs: [bump-version] | |
| uses: ./.github/workflows/build.yml | |
| with: | |
| build_name: main-exp | |
| platform: both | |
| skip_version_bump: true | |
| ref: ${{ needs.bump-version.outputs.commit-hash }} | |
| secrets: inherit | |
| build-rc: | |
| name: Nightly RC build (main-rc) | |
| needs: [bump-version] | |
| uses: ./.github/workflows/build.yml | |
| with: | |
| build_name: main-rc | |
| platform: both | |
| skip_version_bump: true | |
| ref: ${{ needs.bump-version.outputs.commit-hash }} | |
| secrets: inherit | |
| upload-exp-testflight: | |
| name: Upload exp to TestFlight | |
| needs: [build-exp] | |
| runs-on: ghcr.io/cirruslabs/macos-runner:sequoia-xl | |
| environment: apple | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Ruby (iOS) | |
| uses: ruby/setup-ruby@44511735964dcb71245e7e55f72539531f7bc0eb #v1 | |
| with: | |
| ruby-version: '3.2.9' | |
| working-directory: ios | |
| bundler-cache: true | |
| - name: Download iOS build artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ios-main-exp | |
| - name: Find IPA path | |
| id: ipa | |
| run: | | |
| IPA=$(find . -name '*.ipa' -type f | head -1) | |
| if [ -z "$IPA" ]; then | |
| echo "::error::No .ipa file found in artifact" | |
| exit 1 | |
| fi | |
| case "$IPA" in /*) ABS="$IPA" ;; *) ABS="$PWD/$IPA" ;; esac | |
| echo "path=$ABS" >> "$GITHUB_OUTPUT" | |
| - name: Setup App Store Connect API Key | |
| run: | | |
| bash scripts/setup-app-store-connect-api-key.sh \ | |
| "$APP_STORE_CONNECT_API_KEY_ISSUER_ID" \ | |
| "$APP_STORE_CONNECT_API_KEY_KEY_ID" \ | |
| "$APP_STORE_CONNECT_API_KEY_KEY_CONTENT" | |
| env: | |
| APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }} | |
| APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }} | |
| APP_STORE_CONNECT_API_KEY_KEY_CONTENT: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_CONTENT }} | |
| - name: Upload to TestFlight | |
| run: | | |
| bash scripts/upload-to-testflight.sh \ | |
| "github_actions_main-exp" \ | |
| "${{ github.ref_name }}" \ | |
| "${{ steps.ipa.outputs.path }}" \ | |
| "MetaMask BETA & Release Candidates" | |
| - name: Cleanup API Key | |
| if: always() | |
| run: | | |
| rm -f ios/AuthKey.p8 | |
| echo "🧹 Cleaned up API key file" | |
| upload-rc-testflight: | |
| name: Upload RC to TestFlight | |
| needs: [build-rc] | |
| runs-on: ghcr.io/cirruslabs/macos-runner:sequoia-xl | |
| environment: apple | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Ruby (iOS) | |
| uses: ruby/setup-ruby@44511735964dcb71245e7e55f72539531f7bc0eb #v1 | |
| with: | |
| ruby-version: '3.2.9' | |
| working-directory: ios | |
| bundler-cache: true | |
| - name: Download iOS build artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ios-main-rc | |
| - name: Find IPA path | |
| id: ipa | |
| run: | | |
| IPA=$(find . -name '*.ipa' -type f | head -1) | |
| if [ -z "$IPA" ]; then | |
| echo "::error::No .ipa file found in artifact" | |
| exit 1 | |
| fi | |
| case "$IPA" in /*) ABS="$IPA" ;; *) ABS="$PWD/$IPA" ;; esac | |
| echo "path=$ABS" >> "$GITHUB_OUTPUT" | |
| - name: Setup App Store Connect API Key | |
| run: | | |
| bash scripts/setup-app-store-connect-api-key.sh \ | |
| "$APP_STORE_CONNECT_API_KEY_ISSUER_ID" \ | |
| "$APP_STORE_CONNECT_API_KEY_KEY_ID" \ | |
| "$APP_STORE_CONNECT_API_KEY_KEY_CONTENT" | |
| env: | |
| APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }} | |
| APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }} | |
| APP_STORE_CONNECT_API_KEY_KEY_CONTENT: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_CONTENT }} | |
| - name: Upload to TestFlight | |
| run: | | |
| bash scripts/upload-to-testflight.sh \ | |
| "github_actions_main-rc" \ | |
| "${{ github.ref_name }}" \ | |
| "${{ steps.ipa.outputs.path }}" \ | |
| "MetaMask BETA & Release Candidates" | |
| - name: Cleanup API Key | |
| if: always() | |
| run: | | |
| rm -f ios/AuthKey.p8 | |
| echo "🧹 Cleaned up API key file" |