diff --git a/.github/workflows/pub_health.yaml b/.github/workflows/pub_health.yaml new file mode 100644 index 000000000..721a98ea1 --- /dev/null +++ b/.github/workflows/pub_health.yaml @@ -0,0 +1,21 @@ +# Copyright 2025 The Flutter Authors. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# Checks changelog has been modified for changed packages. + +# TODO(polina-c): add `dart-lang/ecosystem/.github/workflows/post_summaries.yaml@*,` +# to the org termissions, to enable this workflow + +name: Health +on: + pull_request: + branches: [ main ] + types: [opened, synchronize, reopened, labeled, unlabeled] +jobs: + health: + uses: dart-lang/ecosystem/.github/workflows/health.yaml@main + with: + checks: "changelog" + permissions: + pull-requests: write diff --git a/.github/workflows/post_summaries.yaml b/.github/workflows/pub_post_summaries.yaml similarity index 100% rename from .github/workflows/post_summaries.yaml rename to .github/workflows/pub_post_summaries.yaml diff --git a/.github/workflows/publish.yaml b/.github/workflows/pub_publish.yaml similarity index 100% rename from .github/workflows/publish.yaml rename to .github/workflows/pub_publish.yaml diff --git a/docs/contributing/publishing.md b/docs/contributing/publishing.md index 825f7b744..03fea9bd3 100644 --- a/docs/contributing/publishing.md +++ b/docs/contributing/publishing.md @@ -19,8 +19,8 @@ To make sure your PR passes this validation, follow [firehose rules](https://git Packages in this repo fall into the following categories: -1. **Not published**: `pubspec.yaml` contains `publish_to: none`. Workspace tools and example apps that are never pushed to pub.dev. -2. **Not yet published**: the package's `version:` ends with a `-wip` suffix (see "`-wip` vs non-`-wip`" below). Published to pub.dev to reserve the name or to test the package; not ready for general use yet. +1. **Not planned to be published**: `pubspec.yaml` contains `publish_to: none`. Workspace tools and example apps that are never pushed to pub.dev. +2. **Not yet published**: the package's `version:` ends with a `-wip` suffix (see "Versioning" below). Not-ready-for-production versions are pushed to pub.dev to reserve the name and maybe to try the package in dev purposes. 3. **Published**: any other package. Each has its own version cadence on pub.dev. ## About `resolution: workspace` @@ -33,32 +33,34 @@ Packages in this repo fall into the following categories: Note that a package can opt out (by omitting `resolution: workspace`) to have separate dependency resolution. -## `-wip` vs non-`-wip` (production ready) versions +## Versioning -The packages code should be always release ready. That means: +We use [Semver] for package versioning, although before 1.0.0, we will be +incrementing only the minor number for breaking changes and the patch number for +non-breaking changes. After 1.0.0, we will be using standard Semver, bumping the +major number for breaking changes. -1. Use `-wip` version (format `0.1.0-wip002`) if **at least one** of the following statements is true: + - 1.1. The package is planned to be released in the future. In this case it is published with `-wip` suffix in order to reserve the package name. +[Semver]: https://semver.org/ - 1.2. The package's last changes touch only non-publishable code or docs (like tests, tools, or not-publishable docs). +The versions may have postfixes: - You can publish `-wip` versions (where `` is a three-digit, zero padded integer like `-wip003`), if you need it for development. +- **`-wip`**: not ready for production +- **`-noop`**: used in CHANGELOG.md and pubspec.yaml to indicate that the code does not contain publishable changes comparing to the previously published version and thus should not be published to pub.dev. +- **no postfix**: release ready version, that should be pushed to pub.dev right after merging the PR that introduced the changes. -2. Remove `-wip` suffix from a version in `pubspec.yaml`, if your change in this package is publishable. +The packages code should be always release ready. That means: -3. If your feature is partially implemented, hide the feature's code behind a false-by-default flag, and use **release-ready** version. (There is no detailed guidance how to define this flag yet. It should be outlined when it is needed. Please create an issue if you need it soon.) +1. Use `-wip` version (format `0.1.0-wip002`) if ready versions for this packages were never published yet, and are planned to be published in the future. -## Versioning +2. Use `-noop` version if your PR touches only non-publishable code or docs (like tests, tools, or not-publishable docs). -We use [Semver] for package versioning, although before 1.0.0, we will be -incrementing only the minor number for breaking changes and the patch number for -non-breaking changes. After 1.0.0, we will be using standard Semver, bumping the -major number for breaking changes. +3. You can publish `-wip` versions, if you need it for development, but do not merge `wip` versions for prod-ready published packages. - +4. Remove `-noop` suffix from a version in `pubspec.yaml`, if your change is publishable. -[Semver]: https://semver.org/ +5. If your feature is partially implemented, hide the feature's code behind a false-by-default flag, and use **release-ready** version. (There is no detailed guidance how to define this flag yet. It should be outlined when it is needed. Please create an issue if you need it soon.) ## How publishing happens? @@ -68,7 +70,31 @@ major number for breaking changes. 2. **Manual**: After reviewing and merging the PR, for each 'ready to publish' version the author of the PR should run `flutter pub publish` or `dart pub publish`. -TODO(polinach): update this section after fix of https://github.com/dart-lang/ecosystem/issues/418. +TODO(polina-c): add validation that all PRs include CHANGELOG.md entries: https://github.com/flutter/genui/issues/967. + +TODO(polina-c): update this section after fix of https://github.com/dart-lang/ecosystem/issues/418. + +## On-call responsibilities + +Weekly: + +1. Make sure each releasable dart package is released (TODO: [auto-create P0 bug](https://github.com/dart-lang/ecosystem/issues/423)) + 1.1. Check the `Package publishing` table in the latest merged PR to see if all non-wip versions are marked `already published`. + 1.2. For packages not yet published, publish them by running `flutter pub publish` (if you do not have permissions, ask in the team chat to be made an admin on the admin page of the package). + +2. Make sure publishable changes are not under `wip` in `CHANGELOG.md` (should be [auto-validated](https://github.com/dart-lang/ecosystem/issues/422) in future). + + If publishable changes are under `wip` in `CHANGELOG.md`: + + 2.1. Convert the wip version to a non-wip version in `CHANGELOG.md`. + + 2.2. Publish the new version. + + 2.3. Comment on the PR that merged publishable changes under `wip`: + + > This PR wrongly placed publishable changes under a `wip` version. This is corrected in PR . See guidelines [here](https://github.com/flutter/genui/blob/main/docs/contributing/publishing.md#-wip-vs-non--wip-production-ready-versions). + + 2.4. Make sure the PR author and reviewers acknowledged the comment. ## How upgrade of dependencies happens? @@ -109,8 +135,9 @@ In https://github.com/organizations/flutter/settings/actions: peter-evans/create-or-update-comment@*, peter-evans/create-pull-request@*, peter-evans/repository-dispatch@*, - dart-lang/ecosystem/.github/workflows/publish.yaml@*, + dart-lang/ecosystem/.github/workflows/health.yaml@*, dart-lang/ecosystem/.github/workflows/post_summaries.yaml@*, + dart-lang/ecosystem/.github/workflows/publish.yaml@*, ``` ### Configure pub.dev for each package diff --git a/packages/genai_primitives/CHANGELOG.md b/packages/genai_primitives/CHANGELOG.md index 059f6c68a..8b3187ad5 100644 --- a/packages/genai_primitives/CHANGELOG.md +++ b/packages/genai_primitives/CHANGELOG.md @@ -1,6 +1,6 @@ # `genai_primitives` Changelog -## 0.2.4-wip001 +## 0.2.4 - **Feature**: Use `log` instead of `print` in example ([#546dab9be](https://github.com/flutter/genui/commit/546dab9be)). diff --git a/packages/genai_primitives/pubspec.yaml b/packages/genai_primitives/pubspec.yaml index 4f46ee409..176937a19 100644 --- a/packages/genai_primitives/pubspec.yaml +++ b/packages/genai_primitives/pubspec.yaml @@ -4,7 +4,7 @@ name: genai_primitives description: A set of primitives for working with generative AI. -version: 0.2.4-wip001 +version: 0.2.4 homepage: https://github.com/flutter/genui/tree/main/packages/genai_primitives license: BSD-3-Clause issue_tracker: https://github.com/flutter/genui/issues