Skip to content

Commit

Permalink
Add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
MillerAdulu committed Aug 20, 2024
1 parent 177965f commit 9cb3da3
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 1 deletion.
54 changes: 54 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Generate Production AAB

on:
release:
types:
- published

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'

- name: 📚 Git Checkout
uses: actions/checkout@v4

- name: 🐦 Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: "3"

- name: 📦 Install Dependencies
run: flutter packages get

- name: ✨ Check Formatting
run: dart format --set-exit-if-changed lib test

- name: ⚙️ Code Generation
run: dart run build_runner build --delete-conflicting-outputs

- name: 🕵️ Analyze
run: flutter analyze lib

- name: ⚙️ Download Android keystore
id: android_keystore
uses: timheuer/[email protected]
with:
fileName: key.jks
encodedString: ${{ secrets.PROD_KEYSTORE }}

- name: 🔐 Create key.properties
run: |
echo "storeFile=${{ steps.android_keystore.outputs.filePath }}" > android/key.properties
echo "storePassword=${{ secrets.PROD_KEYSTORE_PASSPHRASE }}" >> android/key.properties
echo "keyPassword=${{ secrets.PROD_KEYSTORE_PASSWORD }}" >> android/key.properties
echo "keyAlias=${{ secrets.PROD_KEYSTORE_ALIAS }}" >> android/key.properties
- name: ⚙️ Build AAB
run: flutter build appbundle --flavor production --target lib/main_production.dart -vv
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: fluttercon
description: "A new Flutter project."
publish_to: 'none'
version: 1.12.05+11205
version: 1.12.06+11206

environment:
sdk: '>=3.5.0 <4.0.0'
Expand Down

0 comments on commit 9cb3da3

Please sign in to comment.