Skip to content

Use setup-dart for pub.dev publishing#42

Merged
yanncabral merged 1 commit into
mainfrom
fix-pub-oidc
May 26, 2026
Merged

Use setup-dart for pub.dev publishing#42
yanncabral merged 1 commit into
mainfrom
fix-pub-oidc

Conversation

@yanncabral

Copy link
Copy Markdown
Owner

Summary

  • Add dart-lang/setup-dart@v1 before the tag publish step.
  • This lets dart pub publish use GitHub OIDC / pub.dev automated publishing instead of falling back to interactive Google OAuth in CI.

Context

The v0.5.0 tag workflow reached the 🚀 Publish step but got stuck waiting for browser authorization:

Pub needs your authorization to upload packages on your behalf.
Waiting for your authorization...

Validation

  • Parsed .github/workflows/publish.yml as YAML.

Follow-up required

After this merges, configure automated publishing for open_settings_plus on pub.dev if it is not already enabled, then move/recreate the v0.5.0 tag to the merge commit to rerun the publish workflow.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@yanncabral yanncabral merged commit d4f7140 into main May 26, 2026
2 checks passed
@yanncabral yanncabral deleted the fix-pub-oidc branch May 26, 2026 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant