Deploy to Play Store #71
This file contains 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: Deploy to Play Store | |
on: | |
# Enable manual run | |
workflow_dispatch: | |
inputs: | |
lane: | |
description: "Fastlane lane" | |
required: true | |
default: "internal" | |
type: choice | |
options: | |
- internal | |
- alpha | |
# Declare default permissions as read only. | |
permissions: read-all | |
jobs: | |
fastlane-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 17 | |
distribution: temurin | |
- name: Install Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: beta | |
- run: flutter doctor -v | |
- name: Checkout mobile code | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: flutter pub get | |
- name: Code generation | |
run: dart run build_runner build | |
- name: Setup Fastlane | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.2" | |
bundler-cache: true | |
working-directory: android | |
- name: Configure Keystore | |
run: | | |
echo "$PLAY_STORE_UPLOAD_KEY" | base64 --decode > app/upload-keystore.jks | |
echo "storeFile=upload-keystore.jks" >> key.properties | |
echo "keyAlias=$KEYSTORE_KEY_ALIAS" >> key.properties | |
echo "storePassword=$KEYSTORE_STORE_PASSWORD" >> key.properties | |
echo "keyPassword=$KEYSTORE_KEY_PASSWORD" >> key.properties | |
env: | |
PLAY_STORE_UPLOAD_KEY: ${{ secrets.PLAY_STORE_UPLOAD_KEY }} | |
KEYSTORE_KEY_ALIAS: ${{ secrets.KEYSTORE_KEY_ALIAS }} | |
KEYSTORE_KEY_PASSWORD: ${{ secrets.KEYSTORE_KEY_PASSWORD }} | |
KEYSTORE_STORE_PASSWORD: ${{ secrets.KEYSTORE_STORE_PASSWORD }} | |
working-directory: android | |
- name: Exec fastlane deploy | |
run: bundle exec fastlane ${{ github.event.inputs.lane || 'internal' }} | |
env: | |
PLAY_STORE_CONFIG_JSON: ${{ secrets.PLAY_STORE_CONFIG_JSON }} | |
WS_SECRET: ${{ secrets.WS_SECRET }} | |
working-directory: android | |
- name: Install Firebase CLI | |
run: curl -sL https://firebase.tools | bash | |
- name: Deploy symbols to Firebase Crashlytics | |
run: firebase --token="${{ secrets.FIREBASE_CI }}" crashlytics:symbols:upload --app="${{ secrets.FIREBASE_ANDROID_APP_ID }}" ./build/app/outputs/bundle/release/symbols |