Fixed PLAYSTORE_CREDENTIALS issue #6
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 Android & Web | |
on: | |
push: | |
branches: | |
- 125-use-flutter-distributor-instead-of-fastlane-for-deployment | |
workflow_dispatch: | |
inputs: | |
bump_version: | |
description: "Fastlane Bump version example : patch,minor,major (without spaces)" | |
required: true | |
default: "patch" | |
type: string | |
create_tag_and_push: | |
description: 'Create new tag & Push bump version' | |
required: true | |
default: true | |
type: boolean | |
track: | |
description: "Deploy to" | |
required: true | |
default: "alpha" | |
type: choice | |
options: | |
- production | |
- beta | |
- alpha | |
- internal | |
permissions: read-all | |
jobs: | |
# build_web: | |
# name: Build Flutter (Web) | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - uses: subosito/flutter-action@v2 | |
# with: | |
# channel: 'stable' | |
# - run: flutter pub get | |
# - run: flutter config --enable-web | |
# - run: flutter build web | |
# - name: Deploy to Firebase | |
# uses: w9jds/firebase-action@master | |
# with: | |
# args: deploy --only hosting --public web-build | |
# env: | |
# GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }} | |
# PROJECT_ID: default | |
deploy-android: | |
name: Build & Deploy Android Release to ${{ github.event.inputs.track }} track | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
- run: flutter doctor -v | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: install flutter distributor | |
run: dart pub global activate flutter_distributor | |
- 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 | |
echo "$PLAY_STORE_CONFIG_JSON" | base64 --decode > app/playstore_cer.json | |
export PLAYSTORE_CREDENTIALS="app/playstore_cer.json" | |
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 | |
- run: flutter_distributor release --name dev |