From 8d4f976e2bc16657dc4aad70d84596054fc259dc Mon Sep 17 00:00:00 2001 From: Bartek Pacia Date: Mon, 1 Apr 2024 02:11:46 +0200 Subject: [PATCH] update README with new info --- README.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/README.md b/README.md index 9ad175a..eca4d45 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,40 @@ steps: - run: flutter --version ``` +Use version from pubspec.yaml: + +```yaml +steps: + - name: Clone repository + uses: actions/checkout@v4 + - name: Set up Flutter + uses: subosito/flutter-action@v2 + with: + channel: stable + flutter-version-file: pubspec.yaml # path to pubspec.yaml + - run: flutter --version +``` + +> [!IMPORTANT] +> For `flutter-version-file` to work, you need to have the exact Flutter version +> defined in your pubspec.yaml: +> +> **Good** +> +> ```yaml +> environment: +> sdk: ">=3.3.0 <4.0.0" +> flutter: 3.19.0 +> ``` +> +> **Bad** +> +> ```yaml +> environment: +> sdk: ">=3.3.0 <4.0.0" +> flutter: ">= 3.19.0 <4.0.0" +> ``` + Use latest release for particular channel: ```yaml