1- name : Flutter App CI/CD
1+ name : CI
22
33on :
44 push :
@@ -55,21 +55,11 @@ jobs:
5555 - name : Checkout
5656 uses : actions/checkout@v4
5757
58- - name : Setup Flutter
59- uses : subosito/ flutter-action@v2
58+ - name : Setup Flutter App
59+ uses : ./.github/actions/setup- flutter-app
6060 with :
61- flutter-version : ' 3.38.3'
62- channel : ' stable'
63- cache : true
64-
65- - name : Create Firebase google-services.json
66- run : echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > android/app/google-services.json
67-
68- - name : Get dependencies
69- run : flutter pub get
70-
71- - name : Generate mocks
72- run : dart run build_runner build --delete-conflicting-outputs
61+ google-services-json : ${{ secrets.GOOGLE_SERVICES_JSON }}
62+ generate-mocks : ' true'
7363
7464 - name : Analyze code
7565 run : flutter analyze --no-fatal-infos
@@ -106,24 +96,14 @@ jobs:
10696 - name : Checkout
10797 uses : actions/checkout@v4
10898
109- - name : Setup Flutter
110- uses : subosito/ flutter-action@v2
99+ - name : Setup Flutter App
100+ uses : ./.github/actions/setup- flutter-app
111101 with :
112- flutter-version : ' 3.38.3'
113- channel : ' stable'
114- cache : true
115-
116- - name : Create Firebase google-services.json
117- run : echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > android/app/google-services.json
118-
119- - name : Get dependencies
120- run : flutter pub get
102+ google-services-json : ${{ secrets.GOOGLE_SERVICES_JSON }}
121103
122104 - name : Get git version info
123105 id : git_version
124- run : |
125- chmod +x scripts/get_version_info.sh
126- scripts/get_version_info.sh github >> $GITHUB_OUTPUT
106+ run : scripts/get_version_info.sh github >> $GITHUB_OUTPUT
127107
128108 - name : Build web
129109 run : |
@@ -151,7 +131,8 @@ jobs:
151131 - name : Setup Node.js
152132 uses : actions/setup-node@v4
153133 with :
154- node-version : ' 21'
134+ node-version : ' 20'
135+ cache : ' npm'
155136
156137 - name : Download web build artifact
157138 uses : actions/download-artifact@v4
@@ -160,7 +141,7 @@ jobs:
160141 path : build/web
161142
162143 - name : Install npm dependencies
163- run : npm install
144+ run : npm ci
164145
165146 - name : Install Playwright browsers
166147 run : npx playwright install --with-deps chromium
@@ -221,24 +202,14 @@ jobs:
221202 restore-keys : |
222203 ${{ runner.os }}-gradle-
223204
224- - name : Setup Flutter
225- uses : subosito/ flutter-action@v2
205+ - name : Setup Flutter App
206+ uses : ./.github/actions/setup- flutter-app
226207 with :
227- flutter-version : ' 3.38.3'
228- channel : ' stable'
229- cache : true
230-
231- - name : Create Firebase google-services.json
232- run : echo '${{ secrets.GOOGLE_SERVICES_JSON }}' > android/app/google-services.json
233-
234- - name : Get dependencies
235- run : flutter pub get
208+ google-services-json : ${{ secrets.GOOGLE_SERVICES_JSON }}
236209
237210 - name : Get git version info
238211 id : git_version
239- run : |
240- chmod +x scripts/get_version_info.sh
241- scripts/get_version_info.sh github >> $GITHUB_OUTPUT
212+ run : scripts/get_version_info.sh github >> $GITHUB_OUTPUT
242213
243214 - name : Build debug APK
244215 run : |
0 commit comments