@@ -4,13 +4,15 @@ name: build
44# events but only for the develop branch
55on :
66 push :
7- branches : [ develop, master ]
7+ branches : [develop, main ]
88 paths :
9- - ' flutter_cache_manager/**'
9+ - " flutter_cache_manager/**"
10+ - " .github/workflows/**"
1011 pull_request :
11- branches : [ develop ]
12+ branches : [develop]
1213 paths :
13- - ' flutter_cache_manager/**'
14+ - " flutter_cache_manager/**"
15+ - " .github/workflows/**"
1416
1517# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1618jobs :
@@ -26,12 +28,15 @@ jobs:
2628 # Steps represent a sequence of tasks that will be executed as part of the job
2729 steps :
2830 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
29- - uses : actions/checkout@v2
31+ - uses : actions/checkout@v4
3032
3133 # Make sure the stable version of Flutter is available
32- - uses : subosito/flutter-action@v1
34+ - name : Set up Flutter
35+ uses : subosito/flutter-action@v2
3336 with :
34- channel : ' stable'
37+ channel : " stable"
38+ architecture : x64
39+ cache : true
3540
3641 # Download all Flutter packages
3742 - name : Download dependencies
4045
4146 # Run Flutter Format to ensure formatting is valid
4247 - name : Run Flutter Format
43- run : flutter format --set-exit-if-changed .
48+ run : dart format --set-exit-if-changed .
4449 working-directory : ${{env.source-directory}}
4550
4651 analyze :
@@ -55,12 +60,15 @@ jobs:
5560 # Steps represent a sequence of tasks that will be executed as part of the job
5661 steps :
5762 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
58- - uses : actions/checkout@v2
63+ - uses : actions/checkout@v4
5964
6065 # Make sure the stable version of Flutter is available
61- - uses : subosito/flutter-action@v1
66+ - name : Set up Flutter
67+ uses : subosito/flutter-action@v2
6268 with :
63- channel : ' stable'
69+ channel : " stable"
70+ architecture : x64
71+ cache : true
6472
6573 # Download all Flutter packages
6674 - name : Download dependencies
@@ -85,17 +93,21 @@ jobs:
8593 # Steps represent a sequence of tasks that will be executed as part of the job
8694 steps :
8795 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
88- - uses : actions/checkout@v2
96+ - uses : actions/checkout@v4
8997
9098 # Ensure correct JAVA version is installed.
91- - uses : actions/setup-java@v1
99+ - uses : actions/setup-java@v4
92100 with :
93- java-version : ' 12.x'
101+ distribution : " zulu"
102+ java-version : " 17"
94103
95104 # Make sure the stable version of Flutter is available
96- - uses : subosito/flutter-action@v1
105+ - name : Set up Flutter
106+ uses : subosito/flutter-action@v2
97107 with :
98- channel : ' stable'
108+ channel : " stable"
109+ architecture : x64
110+ cache : true
99111
100112 # Download all Flutter packages
101113 - name : Download dependencies
@@ -120,12 +132,15 @@ jobs:
120132 # Steps represent a sequence of tasks that will be executed as part of the job
121133 steps :
122134 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
123- - uses : actions/checkout@v2
135+ - uses : actions/checkout@v4
124136
125137 # Make sure the stable version of Flutter is available
126- - uses : subosito/flutter-action@v1
138+ - name : Set up Flutter
139+ uses : subosito/flutter-action@v2
127140 with :
128- channel : ' stable'
141+ channel : " stable"
142+ architecture : x64
143+ cache : true
129144
130145 # Download all Flutter packages
131146 - name : Download dependencies
@@ -150,12 +165,15 @@ jobs:
150165 # Steps represent a sequence of tasks that will be executed as part of the job
151166 steps :
152167 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
153- - uses : actions/checkout@v2
168+ - uses : actions/checkout@v4
154169
155170 # Make sure the stable version of Flutter is available
156- - uses : subosito/flutter-action@v1
171+ - name : Set up Flutter
172+ uses : subosito/flutter-action@v2
157173 with :
158- channel : ' stable'
174+ channel : " stable"
175+ architecture : x64
176+ cache : true
159177
160178 # Enable platform support
161179 - name : Enable macOS
@@ -185,12 +203,15 @@ jobs:
185203 # Steps represent a sequence of tasks that will be executed as part of the job
186204 steps :
187205 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
188- - uses : actions/checkout@v2
206+ - uses : actions/checkout@v4
189207
190208 # Make sure the stable version of Flutter is available
191- - uses : subosito/flutter-action@v1
209+ - name : Set up Flutter
210+ uses : subosito/flutter-action@v2
192211 with :
193- channel : ' stable'
212+ channel : " stable"
213+ architecture : x64
214+ cache : true
194215
195216 # Enable platform support
196217 - name : Enable Windows
@@ -224,12 +245,15 @@ jobs:
224245 - run : sudo apt-get install -y ninja-build libgtk-3-dev libblkid-dev
225246
226247 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
227- - uses : actions/checkout@v2
248+ - uses : actions/checkout@v4
228249
229250 # Make sure the stable version of Flutter is available
230- - uses : subosito/flutter-action@v1
251+ - name : Set up Flutter
252+ uses : subosito/flutter-action@v2
231253 with :
232- channel : ' stable'
254+ channel : " stable"
255+ architecture : x64
256+ cache : true
233257
234258 # Enable platform support
235259 - name : Enable Linux
@@ -264,12 +288,15 @@ jobs:
264288 # Steps represent a sequence of tasks that will be executed as part of the job
265289 steps :
266290 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
267- - uses : actions/checkout@v2
291+ - uses : actions/checkout@v4
268292
269293 # Make sure the stable version of Flutter is available
270- - uses : subosito/flutter-action@v1
294+ - name : Set up Flutter
295+ uses : subosito/flutter-action@v2
271296 with :
272- channel : ' stable'
297+ channel : " stable"
298+ architecture : x64
299+ cache : true
273300
274301 # Download all Flutter packages
275302 - name : Download dependencies
@@ -292,12 +319,15 @@ jobs:
292319 # Steps represent a sequence of tasks that will be executed as part of the job
293320 steps :
294321 # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
295- - uses : actions/checkout@v2
322+ - uses : actions/checkout@v4
296323
297324 # Make sure the stable version of Flutter is available
298- - uses : subosito/flutter-action@v1
325+ - name : Set up Flutter
326+ uses : subosito/flutter-action@v2
299327 with :
300- channel : ' stable'
328+ channel : " stable"
329+ architecture : x64
330+ cache : true
301331
302332 # Download all Flutter packages
303333 - name : Download dependencies
@@ -309,9 +339,11 @@ jobs:
309339 run : flutter test --coverage
310340 working-directory : ${{env.source-directory}}
311341
312- # Upload code coverage information
313- - uses : codecov/codecov-action@v1
314- with :
315- file : ${{env.source-directory}}/coverage/lcov.info # optional
316- name : CacheManager # optional
317- fail_ci_if_error : true
342+ # # Upload code coverage information
343+ # - uses: codecov/codecov-action@v4
344+ # env:
345+ # CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
346+ # with:
347+ # files: ${{env.source-directory}}/coverage/lcov.info
348+ # name: CacheManager
349+ # fail_ci_if_error: true
0 commit comments