With the push towards automated publishing of packages to pub.dev from the Dart team, they have added in the token workflow into the setup-dart action.
The workflow authenticates to pub.dev using a temporary GitHub-signed OIDC token, the token is created and configured in the dart-lang/setup-dart step. To publish to pub.dev, subsequent steps can run dart pub publish --force.
This means, for Flutter specific packages, your workflow actually has to setup Flutter and Dart which ends up being duplicative and essentially just wasting CI minutes/resources. You can see this in action in very_good_workflows -> flutter_pub_publish.
Example:
Proposed Solutions
- Bring the authentication step into this action. This would most likely require working with the Dart team to understand if there are any concerns with doing this or if it’s possible.
- Allow the passing of a flag to this action to only have it setup Flutter, not Dart. Instead just assuming that Dart has been setup and is already available.
With the push towards automated publishing of packages to pub.dev from the Dart team, they have added in the token workflow into the
setup-dartaction.This means, for Flutter specific packages, your workflow actually has to setup Flutter and Dart which ends up being duplicative and essentially just wasting CI minutes/resources. You can see this in action in very_good_workflows -> flutter_pub_publish.
Example:
setup_dartstep chore: update pub publish scripts VeryGoodOpenSource/flame_behaviors#75Proposed Solutions