Skip to content

Commit 9391a5a

Browse files
committed
Pinned flutter version in vars
1 parent bb1a771 commit 9391a5a

File tree

3 files changed

+33
-8
lines changed

3 files changed

+33
-8
lines changed

.github/workflows/ci.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,29 +13,35 @@ on:
1313
- ci-cd
1414

1515
jobs:
16-
# ── Read version from vars.yml ──────────────────────────────────────
17-
read-version:
18-
name: Read Version
16+
# ── Read variables from vars.yml ────────────────────────────────────
17+
read-vars:
18+
name: Read Variables
1919
runs-on: ubuntu-latest
2020
outputs:
2121
version: ${{ steps.parse.outputs.version }}
22+
flutter_version: ${{ steps.parse.outputs.flutter_version }}
2223
steps:
2324
- uses: actions/checkout@v4
2425
- name: Parse vars.yml
2526
id: parse
2627
run: |
2728
version=$(grep 'name: tk_version' vars.yml -A1 | grep 'value:' | awk '{print $2}')
29+
flutter_version=$(grep 'name: flutter_version' vars.yml -A1 | grep 'value:' | awk '{print $2}')
2830
echo "version=$version" >> "$GITHUB_OUTPUT"
31+
echo "flutter_version=$flutter_version" >> "$GITHUB_OUTPUT"
2932
echo "Version: $version"
33+
echo "Flutter: $flutter_version"
3034
3135
# ── Build Flutter web client ────────────────────────────────────────
3236
build-web-client:
3337
name: Build Web Client
38+
needs: [read-vars]
3439
runs-on: ubuntu-latest
3540
steps:
3641
- uses: actions/checkout@v4
3742
- uses: subosito/flutter-action@v2
3843
with:
44+
flutter-version: ${{ needs.read-vars.outputs.flutter_version }}
3945
channel: stable
4046
- name: Generate Flutter Icons
4147
working-directory: client
@@ -53,7 +59,7 @@ jobs:
5359
# ── Build server binaries ───────────────────────────────────────────
5460
build-server:
5561
name: Build Server (${{ matrix.name }})
56-
needs: [read-version, build-web-client]
62+
needs: [read-vars, build-web-client]
5763
strategy:
5864
matrix:
5965
include:
@@ -141,7 +147,7 @@ jobs:
141147
# ── Build client desktop & Android ──────────────────────────────────
142148
build-client:
143149
name: Build Client (${{ matrix.name }})
144-
needs: [read-version]
150+
needs: [read-vars]
145151
strategy:
146152
matrix:
147153
include:
@@ -181,6 +187,7 @@ jobs:
181187

182188
- uses: subosito/flutter-action@v2
183189
with:
190+
flutter-version: ${{ needs.read-vars.outputs.flutter_version }}
184191
channel: stable
185192

186193
# Android needs Java
@@ -247,7 +254,7 @@ jobs:
247254
# ── Create GitHub Release ───────────────────────────────────────────
248255
release:
249256
name: Create Release
250-
needs: [read-version, build-server, build-client]
257+
needs: [read-vars, build-server, build-client]
251258
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/ci-cd')
252259
runs-on: ubuntu-latest
253260
permissions:
@@ -267,8 +274,8 @@ jobs:
267274
- name: Create GitHub Release
268275
uses: softprops/action-gh-release@v2
269276
with:
270-
tag_name: v${{ needs.read-version.outputs.version }}
271-
name: TimeKeeper v${{ needs.read-version.outputs.version }}
277+
tag_name: v${{ needs.read-vars.outputs.version }}
278+
name: TimeKeeper v${{ needs.read-vars.outputs.version }}
272279
draft: true
273280
prerelease: false
274281
files: |

.github/workflows/qc.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,20 @@ on:
1111
- master
1212

1313
jobs:
14+
read-vars:
15+
name: Read Variables
16+
runs-on: ubuntu-latest
17+
outputs:
18+
flutter_version: ${{ steps.parse.outputs.flutter_version }}
19+
steps:
20+
- uses: actions/checkout@v4
21+
- name: Parse vars.yml
22+
id: parse
23+
run: |
24+
flutter_version=$(grep 'name: flutter_version' vars.yml -A1 | grep 'value:' | awk '{print $2}')
25+
echo "flutter_version=$flutter_version" >> "$GITHUB_OUTPUT"
26+
echo "Flutter: $flutter_version"
27+
1428
protobuf-check:
1529
name: Protobuf Linting
1630
runs-on: ubuntu-latest
@@ -48,13 +62,15 @@ jobs:
4862
run: cargo clippy --all-targets -- -D warnings
4963

5064
flutter-check:
65+
needs: [read-vars]
5166
runs-on: ubuntu-latest
5267
env:
5368
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5469
steps:
5570
- uses: actions/checkout@v4
5671
- uses: subosito/flutter-action@v2
5772
with:
73+
flutter-version: ${{ needs.read-vars.outputs.flutter_version }}
5874
channel: stable
5975
- run: flutter --version
6076
- name: Get dependencies

vars.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@
33
variables:
44
- name: tk_version
55
value: 1.0.0
6+
- name: flutter_version
7+
value: 3.38.9

0 commit comments

Comments
 (0)