Use setup-dart for pub.dev publishing#42
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 40c93c5583
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| - name: 🎯 Setup Dart for pub.dev publishing | ||
| if: startsWith(github.ref, 'refs/tags/v') | ||
| uses: dart-lang/setup-dart@v1 |
There was a problem hiding this comment.
Keep Flutter SDK dart for the publish command
This repository publishes a Flutter plugin (pubspec.yaml declares both dependencies: flutter and a Flutter SDK constraint), but this new step prepends a standalone Dart SDK right before dart pub publish --force. That shadows the Flutter-provided dart binary, which is the one the Dart team’s own publish workflow keeps for Flutter-package publication (it sets up Flutter after setup-dart specifically so Flutter’s dart is used). On tag builds, this can cause publish to fail for Flutter packages even though OIDC is configured.
Useful? React with 👍 / 👎.
Summary
dart-lang/setup-dart@v1before the tag publish step.dart pub publishuse GitHub OIDC / pub.dev automated publishing instead of falling back to interactive Google OAuth in CI.Context
The
v0.5.0tag workflow reached the🚀 Publishstep but got stuck waiting for browser authorization:Validation
.github/workflows/publish.ymlas YAML.Follow-up required
After this merges, configure automated publishing for
open_settings_pluson pub.dev if it is not already enabled, then move/recreate thev0.5.0tag to the merge commit to rerun the publish workflow.