chore(repo): fix release-pr skill step order and add a git-dep pre-fl… #457
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: distribute_internal | |
| on: | |
| push: | |
| branches: | |
| - master | |
| # TODO: Remove once merged to master | |
| - v10.0.0 | |
| workflow_dispatch: | |
| inputs: | |
| platform: | |
| description: 'Platform to build (android, ios, or both)' | |
| required: true | |
| default: 'both' | |
| type: choice | |
| options: | |
| - android | |
| - ios | |
| - both | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| determine_platforms: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| run_ios: ${{ steps.set_matrix.outputs.run_ios }} | |
| run_android: ${{ steps.set_matrix.outputs.run_android }} | |
| steps: | |
| - name: Determine platforms to build | |
| id: set_matrix | |
| run: | | |
| # Is this a branch push? | |
| is_branch_push="${{ github.event_name == 'push' }}" | |
| # If it's a branch push, build both platforms | |
| if [[ "$is_branch_push" == "true" ]]; then | |
| echo "Building all platforms due to branch push" | |
| echo "run_ios=true" >> $GITHUB_OUTPUT | |
| echo "run_android=true" >> $GITHUB_OUTPUT | |
| exit 0 | |
| fi | |
| # For manual workflow dispatch, store platform in a variable | |
| platform="${{ github.event.inputs.platform }}" | |
| echo "Selected platform: $platform" | |
| # Set outputs only if they should be true | |
| [[ "$platform" == "ios" || "$platform" == "both" ]] && echo "run_ios=true" >> $GITHUB_OUTPUT || true | |
| [[ "$platform" == "android" || "$platform" == "both" ]] && echo "run_android=true" >> $GITHUB_OUTPUT || true | |
| android: | |
| needs: determine_platforms | |
| if: ${{ needs.determine_platforms.outputs.run_android == 'true' }} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Connect Bot | |
| uses: webfactory/ssh-agent@v0.10.0 | |
| with: | |
| ssh-private-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }} | |
| - name: "Git Checkout" | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - uses: ./.github/actions/setup-flutter | |
| - name: "Install Tools" | |
| run: flutter pub global activate melos | |
| - name: "Bootstrap Workspace" | |
| run: melos bootstrap | |
| - uses: ./.github/actions/setup-ruby | |
| - name: Setup Firebase Service Account' | |
| working-directory: sample_app/android | |
| run: echo "${{ secrets.SAMPLE_FIREBASE_UPLOAD_CREDENTIALS }}" | base64 --decode | jq > ./firebase-service-account.json | |
| - name: Distribute to Firebase | |
| working-directory: sample_app/android | |
| run: bundle exec fastlane distribute_to_firebase | |
| ios: | |
| needs: determine_platforms | |
| if: ${{ needs.determine_platforms.outputs.run_ios == 'true' }} | |
| runs-on: macos-15 # Requires xcode 15 or later | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Connect Bot | |
| uses: webfactory/ssh-agent@v0.10.0 | |
| with: | |
| ssh-private-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }} | |
| - name: "Git Checkout" | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: '26.3' | |
| - uses: ./.github/actions/setup-flutter | |
| - name: "Disable Swift Package Manager" | |
| run: flutter config --no-enable-swift-package-manager | |
| - name: "Install Tools" | |
| run: flutter pub global activate melos | |
| - name: "Bootstrap Workspace" | |
| run: melos bootstrap | |
| - uses: ./.github/actions/setup-ruby | |
| - name: Setup Firebase Service Account | |
| working-directory: sample_app/ios | |
| run: echo "${{ secrets.SAMPLE_FIREBASE_UPLOAD_CREDENTIALS }}" | base64 --decode | jq > ./firebase-service-account.json | |
| - name: Distribute to Firebase | |
| working-directory: sample_app/ios | |
| env: | |
| MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} | |
| APPSTORE_API_KEY: ${{ secrets.APPSTORE_API_KEY }} | |
| run: bundle exec fastlane distribute_to_firebase | |
| ios_testflight: | |
| needs: determine_platforms | |
| if: ${{ needs.determine_platforms.outputs.run_ios == 'true' }} | |
| runs-on: macos-15 # Requires xcode 15 or later | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Connect Bot | |
| uses: webfactory/ssh-agent@v0.10.0 | |
| with: | |
| ssh-private-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }} | |
| - name: "Git Checkout" | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: '26.3' | |
| - uses: ./.github/actions/setup-flutter | |
| - name: "Disable Swift Package Manager" | |
| run: flutter config --no-enable-swift-package-manager | |
| - name: "Install Tools" | |
| run: flutter pub global activate melos | |
| - name: "Bootstrap Workspace" | |
| run: melos bootstrap | |
| - uses: ./.github/actions/setup-ruby | |
| - name: Distribute to TestFlight Internal | |
| working-directory: sample_app/ios | |
| env: | |
| MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }} | |
| APPSTORE_API_KEY: ${{ secrets.APPSTORE_API_KEY }} | |
| run: bundle exec fastlane distribute_to_testflight_internal |