subosito / flutter-action

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

Add dry-run #270

Closed kzrnm closed 2 months ago

kzrnm commented 4 months ago

I want dry-run parameter for printing.

subosito commented 4 months ago

@kzrnm Any use case for this?

kzrnm commented 4 months ago

For running version checks during scheduled events. Installation of Flutter is not necessary.

on:
  schedule:
    - cron: '30 5 * * 2,4'
jobs:
  version:
    runs-on: ubuntu-latest
    steps:
      - id: flutter-action
        uses: subosito/flutter-action@v2
        with:
          channel: 'stable'
          dry-run: true
      - run: |
          VERSION=${{ steps.flutter-action.outputs.VERSION }}
          echo $VERSION
          # Compare $VERSION and ${{ inputs.current-version }}
          # Notify version...
bartekpacia commented 3 months ago

Interesting. So you would want to have notifications about new Flutter versions, right?

Or to auto-rebuild your app when a new Flutter version comes out?

kzrnm commented 3 months ago

So you would want to have notifications about new Flutter versions, right?

I don't need it if I'm developing alone, but it may be necessary if I'm developing in a team.

bartekpacia commented 2 months ago

Hi! Thank you for the contribution. Could you add tests and update README to reflect your changes?

kzrnm commented 2 months ago

Is this test correct?

https://github.com/subosito/flutter-action/pull/270/commits/03fa8911d9390ae6e83b7fbb02ae94543b1ea872

bartekpacia commented 2 months ago

Yes this is good! I'd also like to see another test that asserts that dart and flutter fail (=are not found) when dry-run: true is passed. Just to make sure that it indeed works.

Please also resolve conflitcts - sorry about that!