chore: dart format #142
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 | |
- gp_build | |
release: | |
types: [published] | |
jobs: | |
release: | |
name: Build and Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v1 | |
with: | |
java-version: '17.x' | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.3 | |
bundler-cache: false | |
- name: Install Fastlane dependencies | |
run: | | |
pwd | |
cd android | |
gem install bundler -v 2.4.22 | |
bundle config path vendor/bundle | |
bundle install | |
cd .. | |
- name: Check gpg version | |
run: gpg --version | |
- name: Decrypting Keystore file | |
env: | |
GPG_PASS: ${{ secrets.GPG_PASS }} | |
run: | | |
cd android/app | |
keyFile=keystore.jks | |
gpg -d --passphrase "$GPG_PASS" --batch $keyFile.asc > $keyFile | |
- name: Decrypting key.properties file | |
env: | |
GPG_PASS: ${{ secrets.GPG_PASS }} | |
run: | | |
cd android/ | |
keyPropFile=key.properties | |
gpg -d --passphrase "$GPG_PASS" --batch $keyPropFile.asc > $keyPropFile | |
- name: Decrypting Fastlane Secret file | |
env: | |
GPG_PASS: ${{ secrets.GPG_PASS }} | |
run: | | |
cd android/ | |
file=fastlane-secret.json | |
gpg -d --passphrase "$GPG_PASS" --batch $file.asc > $file | |
- name: Testing Fastlane installation | |
run: | | |
pwd | |
cd android | |
bundle update fastlane | |
bundle exec fastlane run validate_play_store_json_key | |
- name: Set up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
cache: true | |
# optional parameters follow | |
cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache | |
cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path | |
pub-cache-key: "flutter-pub:os:-:channel:-:version:-:arch:-:hash:" # optional, change this to force refresh cache of dart pub get dependencies | |
pub-cache-path: "${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:" # optional, change this to specify the cache path | |
- run: flutter --version | |
- run: flutter pub get | |
- run: flutter build appbundle --flavor production | |
- run: flutter build apk --flavor production | |
- name: Upload build artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: app-release-bundle | |
path: | | |
build/app/outputs/bundle/productionRelease/app-production-release.aab | |
build/app/outputs/flutter-apk/app-production-release.apk | |
#- name: Deploy Google Play | |
# run: | | |
# pwd | |
# cd android | |
# bundle exec fastlane production_appbundle |