Skip to content

Release v0.6.0 (#792) #391

Release v0.6.0 (#792)

Release v0.6.0 (#792) #391

name: App Distribute CI
on:
push:
branches:
- main
paths:
- dogfooding/**
env:
FLUTTER_VERSION: '3.24.3'
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-latest
timeout-minutes: 60
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 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: Build and Distribute
run: |
cd dogfooding/ios
bundle exec fastlane ios build_and_deploy
build_and_deploy_android:
name: Build and Distribute Dogfooding Android
runs-on: ubuntu-latest
timeout-minutes: 15
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: Build and Distribute
run: |
cd dogfooding/android
bundle exec fastlane android build_and_deploy