flutter-action icon indicating copy to clipboard operation
flutter-action copied to clipboard

Print flutter version after installation

Open jayvdb opened this issue 3 years ago • 2 comments

If the action was only using channel: 'stable' , it would be helpful for the action to print out the version which was installed so the CI logs have that recorded.

jayvdb avatar May 22 '22 02:05 jayvdb

If the action was only using channel: 'stable' , it would be helpful for the action to print out the version which was installed so the CI logs have that recorded.

Why not add flutter --version in action's step?

rk0cc avatar May 25 '22 02:05 rk0cc

I am doing that now, but I had forgotten to do that in one workflow and had month old job logs which didn't have the version in it, and so it wasnt simple to work out when the problem had started occurring. Most other "setup" type actions record the version installed as part of the action step log.

jayvdb avatar May 25 '22 02:05 jayvdb

Oh also if the action can have output it will be nice

eg: ${{ steps.flutter_action.outputs.flutter_version }}

iqfareez avatar Aug 12 '22 22:08 iqfareez

I have added outputs support for flutter-action in v2.7.0 (and v2):

steps:
- uses: actions/checkout@v3
- id: flutter-action
  uses: subosito/flutter-action@v2
  with:
    channel: 'stable'
- run: |
    echo cache-path=${{ steps.flutter-action.outputs.cache-path }}
    echo cache-key=${{ steps.flutter-action.outputs.cache-key }}
    echo channel=${{ steps.flutter-action.outputs.channel }}
    echo version=${{ steps.flutter-action.outputs.version }}
    echo architecture=${{ steps.flutter-action.outputs.architecture }}
  shell: bash

subosito avatar Sep 08 '22 02:09 subosito