Skip to content

fix(llc): ensure query cache is cleared when refreshing channel queri… #39

fix(llc): ensure query cache is cleared when refreshing channel queri…

fix(llc): ensure query cache is cleared when refreshing channel queri… #39

name: distribute_internal
on:
push:
branches:
- master
workflow_dispatch:
inputs:
platform:
description: 'Platform to build (android, ios, or both)'
required: true
default: 'both'
type: choice
options:
- android
- ios
- both
env:
FLUTTER_VERSION: '3.x'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
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
[[ "$platform" == "android" || "$platform" == "both" ]] && echo "run_android=true" >> $GITHUB_OUTPUT
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.9.1
with:
ssh-private-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }}
- name: "Git Checkout"
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "Install Flutter"
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: stable
cache: true
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}
- name: "Install Tools"
run: flutter pub global activate melos
- name: "Bootstrap Workspace"
run: melos bootstrap
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
working-directory: sample_app/android
- 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-latest
timeout-minutes: 30
steps:
- name: Connect Bot
uses: webfactory/ssh-agent@v0.9.1
with:
ssh-private-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }}
- name: "Git Checkout"
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "Install Flutter"
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: stable
cache: true
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}
- name: "Install Tools"
run: flutter pub global activate melos
- name: "Bootstrap Workspace"
run: melos bootstrap
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
working-directory: sample_app/ios
- 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