Closed kuhnroyal closed 3 years ago
Thanks for the PR @kuhnroyal, I appreciate it.
I was thinking similar solution in https://github.com/subosito/flutter-action/issues/47#issuecomment-830146625. But that's become an issue when we need to support various configs other than pubspec.yaml
and when needed additional parameters.
For this case, I prefer having separate action to do the parsing and pass it to flutter-action. So we can focus on the strength of each action.
I propose something like:
- uses: subosito/flutter-version@v1
id: flutter-version
with:
adapter: 'pubspec'
path: 'path/to/custom/pubspec.yaml' # optional, default to pubspec.yaml
- uses: subosito/flutter-action@v1
with:
flutter-version: "{{ steps.flutter-version.outputs.VERSION }}"
What do you think?
I don't know, You can pretty much do it the same way with any of the JSON/Yaml-path actions. It is not much of an improvement then tbh.
But yea the path needs to be configurable. Didn't think about that.
Maybe set the version into the environment and the read it from there.
- uses: subosito/flutter-version@v1
with:
adapter: 'pubspec'
path: 'path/to/custom/pubspec.yaml' # optional, default to pubspec.yaml
- uses: subosito/flutter-action@v1
This would also allow simply usage like:
env:
FLUTTER_VERSION: 2.0.6
...
- uses: subosito/flutter-action@v1
Maybe set the version into the environment and the read it from there.
- uses: subosito/flutter-version@v1 with: adapter: 'pubspec' path: 'path/to/custom/pubspec.yaml' # optional, default to pubspec.yaml - uses: subosito/flutter-action@v1
This would also allow simply usage like:
env: FLUTTER_VERSION: 2.0.6 ... - uses: subosito/flutter-action@v1
This will just move the original issue from the action to the shared secrets - the fact that the version number still needs to be maintained in more than one place.
This will just move the original issue from the action to the shared secrets - the fact that the version number still needs to be maintained in more than one place.
Not in the first case. The 2nd case is just something that would also work if needed when setting/reading it from the environment.
@subosito How do you want to proceed with this?
Added a custom action for FVM - see #101 Other setup actions can follow the same path I suppose.