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

fix: specify pub cache path #280

Closed richardshiue closed 3 months ago

richardshiue commented 3 months ago

Currently, specifying a pub-cache-path like in the README doesn't do anything. This PR fixes this by adding the input. I've set up the priority like this:

  1. If the environmental variable PUB_CACHE is specified before using the action, continue using it.
  2. If PUB_CACHE_PATH is specified and is not the default value, then use it.
  3. Otherwise, use the defaults set by Dart as per https://dart.dev/tools/pub/environment-variables

In every case, the value will be re-exported as the environment variable by the name of PUB_CACHE, written to the action's output in the variable PUB-CACHE-PATH, and its bin sub-directory appended to PATH

resolves https://github.com/subosito/flutter-action/issues/278 resolves https://github.com/subosito/flutter-action/issues/277

subosito commented 3 months ago

awesome, thanks @richardshiue 👍