Skip to content

chore: putting minimum iOS version back to 14 (#946) #542

chore: putting minimum iOS version back to 14 (#946)

chore: putting minimum iOS version back to 14 (#946) #542

name: App Distribute CI
on:
push:
branches:
- main
workflow_dispatch:
inputs:
flavor:
type: choice
description: Build flavor
options:
- beta
- prod
build_ios:
type: boolean
description: iOS
default: true
build_android:
type: boolean
description: Android
default: true
build_web:
type: boolean
description: Web
default: true
env:
FLUTTER_VERSION: "3.29.0"
FLUTTER_CHANNEL: stable
ENV_PROPERTIES: ${{ secrets.ENV_PROPERTIES }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
CREDENTIAL_FILE_CONTENT: ${{ secrets.CREDENTIAL_FILE_CONTENT }}
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }}
APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }}
APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY }}
APPSTORE_API_KEY: ${{ secrets.APPSTORE_API_KEY }}
FASTLANE_APPLE_ID: ${{ secrets.FASTLANE_APPLE_ID }}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_and_deploy_ios:
name: Build and Distribute Dogfooding Ios
runs-on: macos-15
timeout-minutes: 60
if: ${{ github.event_name == 'push' || inputs.build_ios == true }}
steps:
- name: Install Bot SSH Key
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }}
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
cache: true
channel: ${{ env.FLUTTER_CHANNEL }}
flutter-version: ${{ env.FLUTTER_VERSION }}
- name: Setup FlutterFire CLI
run: flutter pub global activate flutterfire_cli
- name: Setup Melos
run: flutter pub global activate melos
- name: Bootstrap workspace
run: melos bootstrap
- name: Prepare environment
run: |
echo "${{ env.ENV_PROPERTIES }}" > .env
echo "${{ env.APPSTORE_API_KEY }}" | base64 --decode > ~/.ssh/appstore_api_key
- name: Setup Ruby and Gems
uses: ruby/setup-ruby@v1
with:
working-directory: dogfooding/ios
bundler-cache: true
- name: Set build flavor to Env
run: |
if [[ ${{ github.event_name == 'workflow_dispatch' }} == true ]]; then
FLAVOR=${{ inputs.flavor }}
else
FLAVOR=beta
fi
echo "FLAVOR=$FLAVOR" >> $GITHUB_ENV
- name: Build and Distribute
run: |
cd dogfooding/ios
bundle exec fastlane ios build_and_deploy flavor:${{ env.FLAVOR }}
build_and_deploy_android:
name: Build and Distribute Dogfooding Android
runs-on: ubuntu-latest
timeout-minutes: 30
if: ${{ github.event_name == 'push' || inputs.build_android == true }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: ⚙️ Set up Java
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: "17"
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
cache: true
channel: ${{ env.FLUTTER_CHANNEL }}
flutter-version: ${{ env.FLUTTER_VERSION }}
- name: Setup Melos
run: flutter pub global activate melos
- name: Bootstrap workspace
run: melos bootstrap
- name: Prepare environment
run: |
echo "${{ env.ENV_PROPERTIES }}" > .env
echo "${{ env.CREDENTIAL_FILE_CONTENT }}" | base64 --decode | jq > dogfooding/android/firebase-service-account.json
- name: Setup Ruby and Gems
uses: ruby/setup-ruby@v1
with:
working-directory: dogfooding/android
bundler-cache: true
- name: Setup Keystore
run: |
echo ${{ secrets.KEYSTORE }} | base64 --decode > dogfooding/android/upload-keystore.jks
echo ${{ secrets.KEYSTORE_PROPERTIES }} | base64 --decode > dogfooding/android/key.properties
- name: Set build flavor to Env
run: |
if [[ ${{ github.event_name == 'workflow_dispatch' }} == true ]]; then
echo "FLAVOR=${{ inputs.flavor }}" >> $GITHUB_ENV
else
echo "FLAVOR=beta" >> $GITHUB_ENV
fi
- name: Build and Distribute
run: |
cd dogfooding/android
bundle exec fastlane android build_and_deploy flavor:${{ env.FLAVOR }}
build_and_deploy_web:
name: Build and Deploy Dogfooding Web
runs-on: ubuntu-latest
timeout-minutes: 10
if: ${{ github.event_name == 'push' || inputs.build_web == true }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: config git
run: |
git config --global user.email "$(git log --format='%ae' HEAD^!)"
git config --global user.name "$(git log --format='%an' HEAD^!)"
git fetch origin gh-pages:gh-pages
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
cache: true
channel: ${{ env.FLUTTER_CHANNEL }}
flutter-version: ${{ env.FLUTTER_VERSION }}
- name: Build and Deploy
uses: bluefireteam/flutter-gh-pages@v9
with:
baseHref: /stream-video-flutter/
workingDir: dogfooding