Skip to content

fix: Add dart-lang/setup-dart for OIDC pub.dev publishing#66

Merged
rmi22186 merged 2 commits intomainfrom
fix/oidc-publish
Apr 2, 2026
Merged

fix: Add dart-lang/setup-dart for OIDC pub.dev publishing#66
rmi22186 merged 2 commits intomainfrom
fix/oidc-publish

Conversation

@rmi22186
Copy link
Copy Markdown
Member

@rmi22186 rmi22186 commented Apr 2, 2026

Background

  • The Release – Publish workflow fails at the flutter pub publish step because the OIDC token exchange with pub.dev is not being handled automatically. The workflow prompts for interactive Google OAuth instead of using the GitHub Actions OIDC token.

What Has Changed

  • Added dart-lang/setup-dart action before Flutter setup — this action configures the OIDC token exchange with pub.dev when id-token: write permission is present
  • Added explicit permissions: id-token: write on the release job level to ensure the OIDC token is available
  • Kept flutter pub publish --force (required for Flutter SDK packages)

Screenshots/Video

  • N/A

Checklist

  • I have performed a self-review of my own code.
  • I have made corresponding changes to the documentation.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have tested this locally.

Additional Notes

  • The pub.dev trusted publisher is already configured for mParticle/mparticle-flutter-sdk with tag pattern v{{version}}
  • This needs to be merged and the v1.1.2 tag re-pushed to test the full flow

Reference Issue (For employees only. Ignore if you are an outside contributor)

  • N/A

flutter pub publish doesn't handle OIDC token exchange automatically.
Add dart-lang/setup-dart which configures the OIDC credential flow,
then use dart pub publish instead. Also add explicit id-token: write
permission on the release job.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cursor
Copy link
Copy Markdown

cursor bot commented Apr 2, 2026

PR Summary

Medium Risk
Changes the tag-triggered release workflow’s permissions and toolchain setup, which can affect publishing/release automation if misconfigured, but does not touch application/runtime code.

Overview
Updates the Release – Publish GitHub Actions workflow to grant the release job explicit contents: write and id-token: write permissions and to install the Dart SDK via dart-lang/setup-dart before Flutter setup.

This adjusts the release pipeline’s authentication/toolchain preparation for the flutter pub publish step (intended to support OIDC-based publishing).

Written by Cursor Bugbot for commit ae0ce6b. This will update automatically on new commits. Configure here.

Flutter packages must use flutter pub publish, not dart pub publish,
since the package depends on the Flutter SDK.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Copy link
Copy Markdown

@nickolas-dimitrakas nickolas-dimitrakas left a comment

Choose a reason for hiding this comment

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

Go for it

@rmi22186 rmi22186 merged commit 11869fc into main Apr 2, 2026
6 checks passed
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.

2 participants