Skip to content

Release automation.#917

Merged
polina-c merged 59 commits into
flutter:mainfrom
polina-c:publish
May 18, 2026
Merged

Release automation.#917
polina-c merged 59 commits into
flutter:mainfrom
polina-c:publish

Conversation

@polina-c
Copy link
Copy Markdown
Collaborator

@polina-c polina-c commented May 13, 2026

Contributes to google/A2UI#1383.

Prerequisite: #926

  1. Add workflows to automate release process (off for now)
  2. Document release process
  3. Cleanup some documentation
  4. Fix pub.dev warnings by removing checked-in git ignores
  5. Fix release validation errors
  6. Document update story (with dependabot)
  7. Remove release tool, because it is not needed any more
  8. Update .github/dependabot.yaml to check packages that are not in root '/' -> '/**'
  9. Pin analyser and comment the problem
  10. Add CI validation for locally broken version constraints

@polina-c polina-c marked this pull request as draft May 14, 2026 21:26
@polina-c
Copy link
Copy Markdown
Collaborator Author

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request restructures the project's contribution documentation by moving detailed guidelines from the root CONTRIBUTING.md to a new docs/contributing directory, which now includes dedicated guides for publishing and pull requests. It also updates package versions and adds publishing restrictions to internal tools. The review feedback identified several opportunities to improve the clarity, grammar, and link stability of the newly added documentation files.

Comment thread docs/contributing/publishing.md Outdated
Comment thread docs/contributing/publishing.md Outdated
Comment thread docs/contributing/publishing.md Outdated
Comment thread docs/contributing/publishing.md Outdated
Comment thread docs/contributing/publishing.md
Comment thread docs/contributing/publishing.md Outdated
Comment thread docs/contributing/publishing.md Outdated
Comment thread docs/contributing/publishing.md Outdated
Comment thread docs/contributing/pull_requests.md Outdated
polina-c and others added 10 commits May 16, 2026 14:26
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@polina-c polina-c marked this pull request as ready for review May 18, 2026 19:25
Comment thread docs/contributing/publishing.md Outdated
2. **Not yet published**: the package's `version:` ends with a `-dev<N>` suffix (see "`-dev` vs non-`-dev`" below). Published to pub.dev only to reserve the name; not ready for general use yet.
3. **Published**: any other package. Each has its own version cadence on pub.dev.

Note: `resolution: workspace` in a `pubspec.yaml` is a tooling concern — it tells Dart to share dependency resolution and a lockfile with the monorepo, and it does **not** by itself imply anything about release cadence. A package can opt out of the workspace (omit `resolution: workspace`) to avoid circular dependencies or unrelated update churn while still being a published package.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If a package opts out of the monorepo, however, it is then implicitly switching to using published packages only, and local changes won't be testable without manual editing of the pubspec files to use local paths, or publishing the dependent packages.

How does using the monorepo increase circular dependency problems? It seems like it would make them better, not worse, since you're using the local versions of the code. But maybe I don't understand the use case you're describing.

And what kind of "update churn"? Since it doesn't imply anything about release cadence, I wouldn't think that would increase the churn. Are you referring to churn in publishing other packages, or churn the package that is part of the monorepo?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Thank you!

Yes this documentation was confusing and some sentences are wrong. Updated.

We still use advantages of monorepo. Added section to explain how.

Comment thread docs/contributing/publishing.md Outdated

1.2. The package's changes touch only non-publishable code or docs (like tests, tools, or not-publishable docs).

You can publish `-dev<number>` versions, if you need it for development.
Copy link
Copy Markdown
Collaborator

@gspencergoog gspencergoog May 18, 2026

Choose a reason for hiding this comment

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

What is the format of <number>? Is it another semver number, or just an ordinal? Is it zero padded, or does it have a dash?

e.g. which of these is it?:

  • 0.1.0-dev1
  • 0.1.0-dev001
  • 0.1.0-dev-1
  • `0.1.0-dev-0.1.0'

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Thank you. Updated doc.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't see a description of the format of <number> in the -dev<number> suffix.

Comment thread docs/contributing/publishing.md Outdated

You can publish `-dev<number>` versions, if you need it for development.

2. If your feature is partially implemented, hide the feature's code behind a false-by-default flag, and use **release-ready** version.
Copy link
Copy Markdown
Collaborator

@gspencergoog gspencergoog May 18, 2026

Choose a reason for hiding this comment

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

Where are the flags specified? Are they --define flags for the Dart compiler? Or are they command line flags? Something else?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

We do not have it organized yet. Documented that it is not defined yet.

Comment thread docs/contributing/publishing.md Outdated

For packages with `resolution: workspace` in their pubspec.yaml, pub resolves every sibling from its local source directory — not from pub.dev, as long as its `version:` satisfies the consumer's constraint.

If a local bump escapes that constraint (e.g. `^0.9.0` → `0.10.0`), update the consumer's `pubspec.yaml` in the same PR. Otherwise pub silently falls back to the published version on pub.dev.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can we have a check for this?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good idea!

added


After a new version of a dependency (including sibling package in this repo) is published, this is how upgrade will happen:

1. [Dependabot] detects the new version on pub.dev and opens a PR per dependency, bumping the constraint in each consuming `pubspec.yaml`. See [About Dependabot version updates] for details.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is there any way to add a new section to each CHANGELOG.md too?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Not natively — Dependabot only edits the manifest. I filed a feature request upstream: dependabot/dependabot-core#15057. For now the doc calls out that the CHANGELOG.md entry has to be added by the maintainer before merging.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Filed an issue and added comment: dependabot/dependabot-core#15057

Comment thread docs/contributing/README.md Outdated
## Shell scripts

Do not review pull requests when they are in draft state, unless explicitly requested by the author.
To run a script in `tool/`, open the script in VSCode and press ⇧⌘B.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Also add instructions for where to run the script from on the command line: not everyone uses VSCode, and that key binding is Mac-only, so you might include the default Linux keybinding too (which is likely to be the same as Windows). They also might have changed the keybinding...

Comment thread docs/contributing/README.md Outdated

## 0.2.4 (in progress)

- **Refactor**: Update core framework to v0.9 (#546dab9be).
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This comment is now lost. When will it be added back in? Shouldn't there be a section for in progress (-dev) changes?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

  • Changed the comment to make sense in the context of the package genai_primitives, that is not concerned about genui.

  • Bumped version

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

But what about in-progress changes: Say I've committed something that isn't meant to be published yet, but I want to accumulate CHANGELOG entries for it when it is published. How am I supposed to do that? I would think there would be a ## 0.2.4-dev entry here with those things, that gets converted to a ## 0.2.4 heading before it is published.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes, you are right.

And this change is samll enough to hold for next release.

Changed.

Comment thread tool/fix_copyright/pubspec.yaml Outdated
name: fix_copyright
description: A command line app to fix copyright headers.
publish_to: none
version: 0.1.0
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If this is publish: none, should it also have a -dev version number?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

it should not have version number at all

deleted here and in other places

@@ -1 +0,0 @@
submodules/JSON-Schema-Test-Suite/**
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If you remove this, then the test suite will be re-published with the package, and that's not our code. It will also make the package a lot bigger, and it's not data that we need to publish.

Don't we need to keep this?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

reverted

thank you!

@polina-c polina-c requested a review from gspencergoog May 18, 2026 23:00
Comment thread docs/contributing/publishing.md Outdated

## About `resolution: workspace`

`resolution: workspace` in a `pubspec.yaml` is a tooling concern and it does **not** by itself imply anything about release cadence:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why is it a "concern"? That implies that we don't really want to use it. Or do you mean that it only is something for the tooling to worry about?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

good catch

resolved

Comment thread docs/contributing/publishing.md Outdated

1.2. The package's changes touch only non-publishable code or docs (like tests, tools, or not-publishable docs).

You can publish `-dev<number>` versions, if you need it for development.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't see a description of the format of <number> in the -dev<number> suffix.

@polina-c
Copy link
Copy Markdown
Collaborator Author

I don't see a description of the format of in the -dev suffix.

Yes, user expects to see it here. Moved here from above.

@polina-c polina-c requested a review from gspencergoog May 18, 2026 23:15
Comment thread docs/contributing/README.md Outdated
Comment thread docs/contributing/publishing.md Outdated
polina-c and others added 3 commits May 18, 2026 16:42
Co-authored-by: Greg Spencer <gspencergoog@users.noreply.github.com>
@polina-c polina-c merged commit 56d7932 into flutter:main May 18, 2026
23 checks passed
@polina-c polina-c deleted the publish branch May 18, 2026 23:49
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