-
Notifications
You must be signed in to change notification settings - Fork 25
80 lines (64 loc) · 2.41 KB
/
main.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
name: Generate production APK
on:
push:
branches:
- main
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.RELEASE_KEYSTORE }}
# - name: 🔐 Create key.properties
# run: |
# echo "storeFile=${{ steps.android_keystore.outputs.filePath }}" > android/key.properties
# echo "storePassword=${{ secrets.RELEASE_KEYSTORE_PASSPHRASE }}" >> android/key.properties
# echo "keyPassword=${{ secrets.RELEASE_KEYSTORE_PASSWORD }}" >> android/key.properties
# echo "keyAlias=${{ secrets.RELEASE_KEYSTORE_ALIAS }}" >> android/key.properties
- name: ⚙️ Build AAB
run: flutter build apk --flavor production --target lib/main_production.dart
- name: 📦 Archive
uses: actions/upload-artifact@v4
with:
name: production-apk
path: build/app/outputs/flutter-apk/app-production-release.apk
# - name: ⚙️ Setup Ruby
# uses: ruby/setup-ruby@v1
# with:
# ruby-version: "3.0"
# bundler-cache: true
# - 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