Skip to content

Migrate to ecosystem's health publish check and setup-dart's publish workflow. - #5254

Merged
davidmorgan merged 4 commits into
dart-lang:masterfrom
davidmorgan:wren/migrate-publish
Nov 2, 2026
Merged

davidmorgan merged 4 commits into
dart-lang:masterfrom
davidmorgan:wren/migrate-publish

Conversation

@davidmorgan

Copy link
Copy Markdown
Contributor

Fix CI :)

@davidmorgan
davidmorgan requested review from mosuem and removed request for mosuem October 30, 2026 13:16
@davidmorgan

Copy link
Copy Markdown
Contributor Author

Uhh I will verify that it actually fixes CI before adding a reviewer again, sorry about that.

@davidmorgan
davidmorgan requested a review from mosuem October 30, 2026 13:26

@natebosch natebosch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Some feedback gemini found while I was working on dart-lang/test#2812 and had it compare to this PR.

Comment thread .github/workflows/publish.yaml Outdated
Comment on lines +26 to +31
directory="${TAG%-v*}"
if [[ ! "$directory" =~ ^[a-z_]+$ ]]; then
echo "No package directory in tag $TAG."
exit 1
fi
echo "directory=$directory" >> "$GITHUB_OUTPUT"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Not all publishable packages in this repo live at the top level — packages under builder_pkgs/ (build_web_compilers, mockito, scratch_space) and built_types/ (built_collection, built_value, built_value_generator, built_value_test) will need their parent directory prefix mapped here.

Comment thread .github/workflows/publish.yaml Outdated
Comment on lines +36 to +39
id-token: write
pull-requests: write
attestations: write
contents: read
uses: dart-lang/setup-dart/.github/workflows/publish.yml@a2a85876fe519099fd3f528670216b240f975906

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

a2a85876fe519099fd3f528670216b240f975906 is from the unmerged draft PR dart-lang/setup-dart#199, which passes --with-attestation to dart pub publish on stable Dart (not supported yet, so publishing will fail). Pinning to setup-dart main (a5bff6576dfc51b47eb77d4b7084bba6a4daf8d2, merged in dart-lang/setup-dart#203) uses the reviewed workflow without attestations and only needs id-token: write.

Comment on lines +40 to +41
with:
working-directory: ${{ needs.package.outputs.directory }}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Once pinned to setup-dart main, pass use-flutter: false here too — use-flutter defaults to true on main (dart-lang/setup-dart#203), which would install Flutter and shadow the Dart SDK from setup-dart.

@davidmorgan

Copy link
Copy Markdown
Contributor Author

Thanks! All three are fixed in f16d4d6, "Address review comments.":

  • Subdirectory packages: the tag PACKAGE-vVERSION now maps to whichever of PACKAGE, builder_pkgs/PACKAGE or built_types/PACKAGE has a pubspec.yaml; the package job checks out the repo to find it, and fails if none matches.
  • setup-dart pin: now a5bff6576dfc51b47eb77d4b7084bba6a4daf8d2, setup-dart main after [publish] Isolate validation, packaging, and publishing into 3 jobs setup-dart#203, with only id-token: write; attestations: write is gone.
  • use-flutter: false is passed.

Since then I merged master in, 0ad1155, to pick up the ecosystem pin bump in health.yaml and post_summaries.yaml.

@davidmorgan
davidmorgan merged commit 9810448 into dart-lang:master Nov 2, 2026
57 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