From 5413007161dd4591623ff249e863582f84ea35fa Mon Sep 17 00:00:00 2001 From: Rafa Date: Thu, 1 Aug 2024 19:57:02 +0200 Subject: [PATCH] update master workflow to be able to build release bundle --- .github/workflows/master-workflow.yml | 19 +++++++++++++++++++ README.md | 3 +++ 2 files changed, 22 insertions(+) diff --git a/.github/workflows/master-workflow.yml b/.github/workflows/master-workflow.yml index 6d30b1d..b1fdc8d 100644 --- a/.github/workflows/master-workflow.yml +++ b/.github/workflows/master-workflow.yml @@ -56,6 +56,25 @@ jobs: # Get flutter dependencies. - run: flutter pub get + # Generate the keystore file + - name: Decode keystore file + env: + CERTIFICATE_BASE64: ${{ secrets.STORE_FILE_CONTENT }} + run: echo $CERTIFICATE_BASE64 | base64 --decode > android/app/my-keystore.jks + + - name: Create temporary key.properties + run: | + echo "storeFile=my-keystore.jks" > android/key.properties + echo "storePassword=${{ secrets.STORE_PASSWORD }}" >> android/key.properties + echo "keyAlias=${{ secrets.KEY_ALIAS }}" >> android/key.properties + echo "keyPassword=${{ secrets.KEY_PASSWORD }}" >> android/key.properties + + # Generate the .env file + - name: Generate .env file + env: + SPOTIFY_CLIENT_ID: ${{ secrets.SPOTIFY_CLIENT_ID }} + run: echo "spotify_client_id=SPOTIFY_CLIENT_ID" > .env + # Build Android release - run: flutter build appbundle --release diff --git a/README.md b/README.md index 6cd9dd9..531a738 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,9 @@ Here are the first steps to get started if you want to use this template as base - Change package name - Create Firebase app [instructions](https://firebase.google.com/docs/flutter/setup) - Add secrets to your Github repository [instructions](https://github.com/marketplace/actions/firebase-app-distribution): + - STORE_PASSWORD + - KEY_ALIAS + - KEY_PASSWORD - FIREBASE_ANDROID_APP_ID - FIREBASE_TOKEN - SERVICE_ACCOUNT_JSON. Used to upload the Android app to Google Play. Please check [this](https://developers.google.com/android-publisher/getting_started#:~:text=Google%20Play%20Console.-,Go%20to%20the%20API%20access%20page%20on%20the%20Google%20Play,Google%20Play%20Console%2C%20click%20Done.) for instructions.