1
1
name : Deploy Android & Web
2
2
on :
3
- # Enable manual run
3
+ push :
4
+ branches :
5
+ - 125-use-flutter-distributor-instead-of-fastlane-for-deployment
6
+
4
7
workflow_dispatch :
5
8
inputs :
6
9
bump_version :
28
31
29
32
permissions : read-all
30
33
jobs :
31
- build_web :
32
- name : Build Flutter (Web)
33
- runs-on : ubuntu-latest
34
- steps :
35
- - uses : actions/checkout@v3
36
- - uses : subosito/flutter-action@v2
37
- with :
38
- channel : ' stable'
39
- - run : flutter pub get
40
- - run : flutter config --enable-web
41
- - run : flutter build web
42
- - name : Deploy to Firebase
43
- uses : w9jds/firebase-action@master
44
- with :
45
- args : deploy --only hosting --public web-build
46
- env :
47
- GCP_SA_KEY : ${{ secrets.GCP_SA_KEY }}
48
- PROJECT_ID : default
34
+ # build_web:
35
+ # name: Build Flutter (Web)
36
+ # runs-on: ubuntu-latest
37
+ # steps:
38
+ # - uses: actions/checkout@v3
39
+ # - uses: subosito/flutter-action@v2
40
+ # with:
41
+ # channel: 'stable'
42
+ # - run: flutter pub get
43
+ # - run: flutter config --enable-web
44
+ # - run: flutter build web
45
+ # - name: Deploy to Firebase
46
+ # uses: w9jds/firebase-action@master
47
+ # with:
48
+ # args: deploy --only hosting --public web-build
49
+ # env:
50
+ # GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }}
51
+ # PROJECT_ID: default
49
52
50
53
deploy-android :
51
54
name : Build & Deploy Android Release to ${{ github.event.inputs.track }} track
@@ -56,16 +59,10 @@ jobs:
56
59
with :
57
60
channel : stable
58
61
- run : flutter doctor -v
59
- # Checkout Repo code
60
62
- name : Checkout Repo
61
63
uses : actions/checkout@v3
62
- # Setup Ruby, Bundler, Gemfile & flutter dependencies & Build Android
63
- - name : Setup Fastlane
64
- uses : ruby/setup-ruby@72d59482210349c1114eca714b6c5df19fbbec34
65
- with :
66
- ruby-version : " 2.6"
67
- bundler-cache : true
68
- working-directory : android
64
+ - name : install flutter distributor
65
+ run : dart pub global activate flutter_distributor
69
66
70
67
- name : Configure Keystore
71
68
run : |
@@ -74,16 +71,13 @@ jobs:
74
71
echo "keyAlias=$KEYSTORE_KEY_ALIAS" >> key.properties
75
72
echo "storePassword=$KEYSTORE_STORE_PASSWORD" >> key.properties
76
73
echo "keyPassword=$KEYSTORE_KEY_PASSWORD" >> key.properties
74
+ echo "$PLAY_STORE_CONFIG_JSON" | base64 --decode > app/playstore_cer.jks
75
+ export PLAYSTORE_CREDENTIALS="app/playstore_cer.jks"
77
76
env :
78
77
PLAY_STORE_UPLOAD_KEY : ${{ secrets.PLAY_STORE_UPLOAD_KEY }}
79
78
KEYSTORE_KEY_ALIAS : ${{ secrets.KEYSTORE_KEY_ALIAS }}
80
79
KEYSTORE_KEY_PASSWORD : ${{ secrets.KEYSTORE_KEY_PASSWORD }}
81
80
KEYSTORE_STORE_PASSWORD : ${{ secrets.KEYSTORE_STORE_PASSWORD }}
82
81
working-directory : android
83
82
84
- - run : bundle exec fastlane bump_version bump:${{ github.event.inputs.bump_version }} push:${{ github.event.inputs.create_tag_and_push }} branch:${{ github.ref_name }}
85
- working-directory : android
86
- - run : bundle exec fastlane android deploy track:${{ github.event.inputs.track }}
87
- working-directory : android
88
- env :
89
- PLAY_STORE_CONFIG_JSON : ${{ secrets.PLAY_STORE_CONFIG_JSON }}
83
+ - run : flutter_distributor release --name dev
0 commit comments