-
Notifications
You must be signed in to change notification settings - Fork 25
81 lines (65 loc) · 2.41 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
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 -v
- name: ⚙️ Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.0"
bundler-cache: true
- name: ⚙️ Cache bundle dependencies
uses: actions/cache@v4
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: ${{ runner.os }}-gems-
- name: ⚙️ Download bundle dependencies
run: |
gem install bundler:2.0.2
bundle install
- name: 🚀 Release to Google Play (Production)
env:
SUPPLY_PACKAGE_NAME: ${{ secrets.ANDROID_PACKAGE_NAME }}
SUPPLY_JSON_KEY_DATA: ${{ secrets.PLAY_STORE_CREDENTIALS }}
run: |
bundle exec fastlane supply \
--aab build/app/outputs/bundle/productionRelease/app-production-release.aab \
--track production