@@ -2,14 +2,31 @@ name: build_nightly
22
33on :
44 push :
5- branches :
6- - develop
5+ # branches:
6+ # - develop
77 workflow_dispatch :
8+ inputs :
9+ build_ios :
10+ type : boolean
11+ description : iOS
12+ default : true
13+ build_android :
14+ type : boolean
15+ description : Android
16+ default : true
17+ build_web :
18+ type : boolean
19+ description : Web
20+ default : true
821
922defaults :
1023 run :
1124 working-directory : sample_app
1225
26+ env :
27+ FLUTTER_VERSION : " 3.29.0"
28+ FLUTTER_CHANNEL : stable
29+
1330concurrency :
1431 group : ${{ github.workflow }}-${{ github.ref }}
1532 cancel-in-progress : true
@@ -18,14 +35,22 @@ jobs:
1835 build_and_deploy_ios :
1936 runs-on : macos-latest
2037 timeout-minutes : 40
38+ # if: ${{ github.event_name == 'push' || inputs.build_ios == true }}
39+ if : false
2140 steps :
41+ - name : Install Bot SSH Key
42+ uses :
webfactory/[email protected] 43+ with :
44+ ssh-private-key : ${{ secrets.BOT_SSH_PRIVATE_KEY }}
45+
2246 - name : Checkout code
2347 uses : actions/checkout@v3
2448
2549 - name : Setup Flutter
2650 uses : subosito/flutter-action@v2
2751 with :
28- channel : stable
52+ channel : ${{ env.FLUTTER_CHANNEL }}
53+ flutter-version : ${{ env.FLUTTER_VERSION }}
2954 cache : true
3055
3156 - name : Setup Ruby and Gems
@@ -39,13 +64,12 @@ jobs:
3964
4065 - name : Copy google service account
4166 run : |
42- echo "${{ secrets.SAMPLE_FIREBASE_UPLOAD_CREDENTIALS }}" > ${{GITHUB_WORKSPACE}} /firebase-service-account.json
67+ echo "${{ secrets.SAMPLE_FIREBASE_UPLOAD_CREDENTIALS }}" | base64 --decode | jq > ${{ github.workspace }}/sample_app/ios /firebase-service-account.json
4368
4469 - name : Build and release
4570 env :
71+ GOOGLE_APPLICATION_CREDENTIALS : " ${{ github.workspace }}/sample_app/ios/firebase-service-account.json"
4672 MATCH_PASSWORD : ${{ secrets.MATCH_PASSWORD }}
47- MATCH_GIT_BASIC_AUTHORIZATION : ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
48- GOOGLE_APPLICATION_CREDENTIALS : ${{GITHUB_WORKSPACE}}/firebase-service-account.json
4973 run : |
5074 flutter build ios --no-codesign
5175 cd ios
@@ -54,42 +78,56 @@ jobs:
5478 build_and_deploy_android :
5579 runs-on : ubuntu-latest
5680 timeout-minutes : 15
81+ if : ${{ github.event_name == 'push' || inputs.build_android == true }}
5782 steps :
83+ - name : Install Bot SSH Key
84+ uses :
webfactory/[email protected] 85+ with :
86+ ssh-private-key : ${{ secrets.BOT_SSH_PRIVATE_KEY }}
87+
5888 - name : Checkout code
5989 uses : actions/checkout@v3
6090
6191 - name : Setup Java
6292 uses : actions/setup-java@v1
6393 with :
64- java-version : ' 12.x'
94+ distribution : " zulu"
95+ java-version : " 17"
6596
6697 - name : Setup Flutter
6798 uses : subosito/flutter-action@v2
6899 with :
69- channel : stable
100+ channel : ${{ env.FLUTTER_CHANNEL }}
101+ flutter-version : ${{ env.FLUTTER_VERSION }}
70102 cache : true
71103
72104 - name : Build
73105 run : flutter build apk
74106
107+ - name : Copy google service account
108+ run : |
109+ echo "${{ secrets.SAMPLE_FIREBASE_UPLOAD_CREDENTIALS }}" | base64 --decode | jq > ${{ github.workspace }}/sample_app/android/firebase-service-account.json
110+
75111 - name : Deploy
76112 uses : wzieba/Firebase-Distribution-Github-Action@v1
77113 with :
78114 appId : ${{secrets.SAMPLE_FIREBASE_ANDROID_APPID}}
79- serviceCredentialsFileContent : ${{secrets.SAMPLE_FIREBASE_UPLOAD_CREDENTIALS}}
115+ serviceCredentialsFile : " ${{ github.workspace }}/sample_app/android/firebase-service-account.json "
80116 groups : stream-testers
81117 debug : true
82- file : sample_app/ build/app/outputs/apk/release /app-release.apk
118+ file : build/app/outputs/flutter- apk/app-release.apk
83119
84120 - name : Upload APK
85- uses : actions/upload-artifact@v3
121+ uses : actions/upload-artifact@v4
86122 with :
87123 name : android-stream-chat-v1
88- path : sample_app/ build/app/outputs/apk/release /app-release.apk
124+ path : build/app/outputs/flutter- apk/app-release.apk
89125
90126 build_and_deploy_web :
91127 runs-on : ubuntu-latest
92128 timeout-minutes : 10
129+ # if: ${{ github.event_name == 'push' || inputs.build_web == true }}
130+ if : false
93131 steps :
94132 - name : Checkout code
95133 uses : actions/checkout@v3
@@ -103,14 +141,14 @@ jobs:
103141 - name : Setup Flutter
104142 uses : subosito/flutter-action@v2
105143 with :
106- channel : stable
144+ channel : ${{ env.FLUTTER_CHANNEL }}
145+ flutter-version : ${{ env.FLUTTER_VERSION }}
107146 cache : true
108- flutter-version : 3.29.0
109147
110148 - name : Build and Deploy
111- uses : bluefireteam/flutter-gh-pages@v7
149+ uses : bluefireteam/flutter-gh-pages@v9
112150 with :
113- baseHref : /flutter-samples /
151+ baseHref : /stream-chat-flutter /
114152 workingDir : sample_app
115153
116154
0 commit comments