Merge pull request #72 from denysvitali/feature/support-user-cas #108
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
# Based on https://medium.com/flutter-community/automating-publishing-your-flutter-apps-to-google-play-using-github-actions-2f67ac582032 | |
name: Flutter release | |
on: | |
push: | |
branches: | |
- main | |
release: | |
types: [published] | |
jobs: | |
release: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Setup Java | |
uses: actions/setup-java@v1 | |
with: | |
java-version: '12.x' | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v1 | |
with: | |
channel: stable | |
- name: Flutter version | |
run: flutter --version | |
- name: Cache pub dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ${{ env.FLUTTER_HOME }}/.pub-cache | |
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }} | |
restore-keys: ${{ runner.os }}-pub- | |
- name: Download pub dependencies | |
run: flutter pub get | |
- name: Download Android keystore | |
id: android_keystore | |
uses: timheuer/[email protected] | |
with: | |
fileName: key.jks | |
encodedString: ${{ secrets.ANDROID_KEYSTORE_BASE64 }} | |
- name: Create key.properties | |
run: | | |
echo "storeFile=${{ steps.android_keystore.outputs.filePath }}" > android/key.properties | |
echo "storePassword=${{ secrets.ANDROID_KEYSTORE_PASSWORD }}" >> android/key.properties | |
echo "keyPassword=${{ secrets.ANDROID_KEY_PASSWORD }}" >> android/key.properties | |
echo "keyAlias=${{ secrets.ANDROID_KEY_ALIAS }}" >> android/key.properties | |
- name: Build Android App Bundle | |
run: flutter build appbundle --flavor core | |
- name: Build Android APK | |
run: flutter build apk --flavor core | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: app-release-bundle | |
path: | | |
build/app/outputs/bundle/coreRelease/app-core-release.aab | |
build/app/outputs/flutter-apk/app-core-release.apk | |