shorebirdtech / setup-shorebird

A GitHub Action to install and setup Shorebird
https://docs.shorebird.dev/ci/github
MIT License
18 stars 3 forks source link

feat: Specify flutter version and/or disable automatic download #18

Open mrgnhnt96 opened 5 months ago

mrgnhnt96 commented 5 months ago

Current Implementation

Shorebird automatically downloads the latest version of the modified Flutter SDK

Problem

Context

Sometimes, for one reason or another, not using the latest version of the Flutter SDK is required. If it isn't needed, the latest version gets downloaded during the setup and is never used.

Specifying a version could be considered redundant, however, if the shorebird release|patch already performs a check for the version provided by --flutter-version. It might be better to turn off the automatic download since it will happen later down the pipeline anyways.

The Proposition

eseidel commented 5 months ago

My understanding is that the user knows they're building their app with Flutter version X, which is not the default version included with Shorebird, and so they'd like to disable Shorebird from downloading that other version Y, on CI and only download X. This request is suggesting either making X an option to the shorebird install step, or making shorebird itself not download a flutter version until needed, I think?

It's mostly a CI-specific problem.

We also could do other things to reduce the downloaded size of Flutter, particularly on CI where Linux (and thus a modern version of Git) is possibly more available.

eseidel commented 5 months ago

See also https://github.com/shorebirdtech/install/issues/33.

johnmartel commented 4 months ago

Related to this, it would be nice if we could specify the Shorebird version installed by this action. Bonus points for supporting reading version from .tool-versions. Just been hit by this action downloading 1.1.11 and requiring me to upgrade Flutter to 3.22.2.

eseidel commented 4 months ago

Sorry for the disruption re: 3.22.2 being now required for iOS.

TIL: https://asdf-vm.com/manage/configuration.html

johnmartel commented 4 months ago

@eseidel For some context on the above request:

felangel commented 1 week ago

Fwiw we just released support for caching your Shorebird installation (including Flutter artifacts) in v1.0.1 in case that helps 👍