Skip to content

Commit

Permalink
ci: 统一将 flutter 版本号存放至 pubspec 中
Browse files Browse the repository at this point in the history
  • Loading branch information
he0119 committed Dec 4, 2024
1 parent d198e1f commit a726860
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
20 changes: 8 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
flutter_version: "3.24.2"
flutter_channel: "stable"

jobs:
test:
name: Test
Expand Down Expand Up @@ -51,8 +47,8 @@ jobs:
- name: Setup Flutter
uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff
with:
flutter-version: ${{ env.flutter_version }}
channel: ${{ env.flutter_channel }}
channel: stable
flutter-version-file: pubspec.yaml
cache: true

- name: Flutter test
Expand Down Expand Up @@ -95,8 +91,8 @@ jobs:
- name: Setup Flutter
uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff
with:
flutter-version: ${{ env.flutter_version }}
channel: ${{ env.flutter_channel }}
channel: stable
flutter-version-file: pubspec.yaml
cache: true

- name: Build split-per-abi apks
Expand Down Expand Up @@ -132,8 +128,8 @@ jobs:
- name: Setup Flutter
uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff
with:
flutter-version: ${{ env.flutter_version }}
channel: ${{ env.flutter_channel }}
channel: stable
flutter-version-file: pubspec.yaml
cache: true

- name: Build web version
Expand Down Expand Up @@ -177,8 +173,8 @@ jobs:
- name: Setup Flutter
uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff
with:
flutter-version: ${{ env.flutter_version }}
channel: ${{ env.flutter_channel }}
channel: stable
flutter-version-file: pubspec.yaml
cache: true

- name: Build windows version
Expand Down
2 changes: 1 addition & 1 deletion pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1650,4 +1650,4 @@ packages:
version: "3.1.2"
sdks:
dart: ">=3.5.0 <4.0.0"
flutter: ">=3.24.0"
flutter: ">=3.24.2"
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ publish_to: "none"

environment:
sdk: ">=3.4.0 <4.0.0"
flutter: "3.24.2" # This must be exact! No ranges allowed.

dependencies:
flutter:
Expand Down

0 comments on commit a726860

Please sign in to comment.