subosito / flutter-action

Flutter environment for use in GitHub Actions. It works on Linux, Windows, and macOS.
MIT License
2.23k stars 199 forks source link

Add support for `flutter_versio_frigidus` #117

Closed campovski closed 2 years ago

campovski commented 2 years ago

Tool flutter_versio_frigidus gives support for storing and restoring local Flutter version to and from a file, located in Flutter project root directory. This tool is useful when working with legacy code that requires an old version of Flutter.

Without this PR, current workflow has to look something like this:

- uses: subosito/flutter-action@v1
  with:
    channel: stable
- run: flutter pub global activate flutter_versio_frigidus
- run: fvf --restore

or

- uses: subosito/flutter-action@v1
  with:
    version: 'some_version'

The issue with first configuration is that it builds the Flutter tool twice if versions do not match, and the issue with second is that you have to keep 'some_version' consistent with the one in file produced by flutter_version_frigidus.

kuhnroyal commented 2 years ago

This is similar to my issue https://github.com/subosito/flutter-action/issues/101 and PR https://github.com/subosito/flutter-action/pull/103 which was declined for good reason. I ended up publishing a small action for FVM that reads the custom config into an env variable which then can be reused for the flutter setup.

I don't think this should be merged.

campovski commented 2 years ago

I agree.