Skip to content

Deploy Beta to TestFlight and Play Store #155

Deploy Beta to TestFlight and Play Store

Deploy Beta to TestFlight and Play Store #155

Workflow file for this run

name: Deploy Beta to TestFlight and Play Store
on:
workflow_dispatch:
release:
types: [ published ]
jobs:
deploy:
runs-on: macos-13
strategy:
matrix:
platform: [ ios, android ]
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Install Bundle
run: cd ./${{ matrix.platform }} && bundle install
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:'
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:arch:'
- if: matrix.platform == 'android'
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '17'
- name: Install Flutter Packages
run: |
flutter config --no-analytics
flutter pub get
- if: matrix.platform == 'ios'
name: Install latest CocoaPods Version
run: sudo gem install cocoapods
- if: matrix.platform == 'ios'
name: Install CocoaPods
run: cd ./ios && pod install
- if: matrix.platform == 'ios'
name: Add SSH Key
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.MATCH_DEPLOY_KEY }}
- if: matrix.platform == 'ios' && github.event_name == 'release'
name: Build and Deploy With Release Notes to TestFlight
run: |
cd ./ios
bundle exec fastlane ios_beta
env:
APP_STORE_CONNECT_API_KEY_ID: ${{ secrets.ASC_KEY_ID }}
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }}
APP_STORE_CONNECT_API_KEY_BASE64: ${{ secrets.ASC_PRIVATE_KEY }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
RELEASE_NOTES: ${{ github.event.release.body }}
- if: matrix.platform == 'ios' && github.event_name != 'release'
name: Build and Deploy to TestFlight
run: |
cd ./ios
bundle exec fastlane ios_beta
env:
APP_STORE_CONNECT_API_KEY_ID: ${{ secrets.ASC_KEY_ID }}
APP_STORE_CONNECT_ISSUER_ID: ${{ secrets.ASC_ISSUER_ID }}
APP_STORE_CONNECT_API_KEY_BASE64: ${{ secrets.ASC_PRIVATE_KEY }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
- if: matrix.platform == 'android'
name: Deserialize Keystore File
run: cd ./android/app && echo "$ANDROID_KEYSTORE_FILE" | base64 --decode > ./upload-keystore
env:
ANDROID_KEYSTORE_FILE: ${{ secrets.ANDROID_KEYSTORE_FILE }}
- if: matrix.platform == 'android'
name: Deploy to Google Play Store
run: |
cd ./android
bundle exec fastlane android_beta
env:
GOOGLE_PLAY_SERVICE_ACCOUNT_KEY: ${{ secrets.GOOGLE_PLAY_SERVICE_ACCOUNT_KEY }}
ANDROID_KEYSTORE_FILE: ./upload-keystore
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}