-
Notifications
You must be signed in to change notification settings - Fork 152
Release automation. #917
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
polina-c
wants to merge
27
commits into
flutter:main
Choose a base branch
from
polina-c:publish
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Release automation. #917
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
525db20
Create publish.yaml
polina-c 15412d8
Merge branch 'main' of https://github.com/flutter/genui into publish
polina-c 6b53a7b
-
polina-c a726a97
Update publish.yaml
polina-c a103178
Merge branch 'main' of https://github.com/flutter/genui into publish
polina-c 03af6a8
-
polina-c 052e2c4
-
polina-c 9425693
Update CONTRIBUTING.md
polina-c 6554fc1
-
polina-c 1afbe08
Update pull_requests.md
polina-c 0f7cfa5
-
polina-c 34611bd
Merge remote-tracking branch 'refs/remotes/origin/publish' into publish
polina-c bca0e66
Update publishing.md
polina-c 0a6181a
Update publishing.md
polina-c 40c9e68
-
polina-c 2f072a4
Update publishing.md
polina-c 56d618f
-
polina-c 9939064
-
polina-c 751f970
-
polina-c 33359ad
Update docs/contributing/pull_requests.md
polina-c c5cb8b1
Update docs/contributing/publishing.md
polina-c 667bad4
Update docs/contributing/publishing.md
polina-c 7d81961
Update docs/contributing/publishing.md
polina-c 61c45a3
Update docs/contributing/publishing.md
polina-c 656824b
Update docs/contributing/publishing.md
polina-c 36a982f
-
polina-c 2048223
Merge remote-tracking branch 'refs/remotes/origin/publish' into publish
polina-c File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # 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. | ||
|
|
||
| # A CI configuration for pub-publish to write comments on PRs. | ||
|
|
||
| name: Comment on the pull request | ||
|
|
||
| on: | ||
| workflow_run: | ||
| workflows: | ||
| - Publish | ||
| types: | ||
| - completed | ||
|
|
||
| jobs: | ||
| upload: | ||
| uses: dart-lang/ecosystem/.github/workflows/post_summaries.yaml@main | ||
| permissions: | ||
| pull-requests: write |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # 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. | ||
|
|
||
| # A CI configuration to auto-publish pub packages. | ||
|
|
||
| name: Publish | ||
|
|
||
| on: | ||
| pull_request: | ||
| branches: [ main ] | ||
| types: [opened, synchronize, reopened, labeled, unlabeled] | ||
| push: | ||
| # Match <package-name>-v<version> publish tags | ||
| tags: [ '[A-z0-9]+-v[0-9]+.[0-9]+.[0-9]+' ] | ||
|
|
||
| jobs: | ||
| publish: | ||
| if: ${{ github.repository_owner == 'flutter' }} | ||
| uses: dart-lang/ecosystem/.github/workflows/publish.yaml@main | ||
| with: | ||
| # See https://github.com/dart-lang/ecosystem/tree/main/pkgs/firehose#options | ||
| sdk: beta # version of dart sdk to use for publishing | ||
| use-flutter: true | ||
| write-comments: false | ||
| checkout_submodules: true | ||
| permissions: | ||
| id-token: write | ||
| pull-requests: write |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
|
|
||
| # Publishing | ||
|
|
||
| Publishing to [pub.dev](https://pub.dev) happens automatically via GitHub Actions, with the help of | ||
| [firehose rules](https://github.com/dart-lang/ecosystem/tree/main/pkgs/firehose). | ||
|
|
||
| There are two CI workflows that enable this automation: | ||
|
|
||
| 1. [post_summaries.yaml](../../.github/workflows/post_summaries.yaml) | ||
| 2. [publish.yaml](../../.github/workflows/publish.yaml) | ||
|
|
||
| ## Passing the publish / validate job | ||
|
|
||
| In general, the job [publish / validate](https://github.com/flutter/genui/actions/runs/25936562918) checks if all pub.dev packages are ready for publishing. | ||
|
|
||
| To make sure your PR passes this validation, follow [firehose rules](https://github.com/dart-lang/ecosystem/tree/main/pkgs/firehose). | ||
|
|
||
| ## Package categories | ||
|
|
||
| `pub.dev` packages in this repo fall into three categories: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| 1. **Not intended to be published**: they have `publish_to: none` in their `pubspec.yaml`. | ||
| 2. **Mono-repo packages**: they have `resolution: workspace` in their `pubspec.yaml`, and are released together, in lock-step, with the same version number. | ||
| 3. **Independent packages**: they don't have `publish_to` and `resolution` fields in their `pubspec.yaml`. They are released independently. | ||
| 4. **Not yet published packages**: they have `resolution: workspace` and `release: none` in their `pubspec.yaml`. | ||
|
|
||
| ## `-dev` vs non-`-dev` (production ready) versions | ||
|
polina-c marked this conversation as resolved.
|
||
|
|
||
| The packages code should be always release ready. That means: | ||
|
|
||
| 1. Use `-dev` version 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 `-dev` suffix in order to reserve the package name. | ||
|
|
||
| 1.2. The package's changes touch only pub.dev non-publishable code or docs (like tests, tools, or not-publishable docs) and it is not a mono-repo package in lock-step with another package that has publishable code. | ||
|
|
||
| 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. | ||
|
|
||
| ## Versioning | ||
|
|
||
| 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. | ||
|
|
||
| <!-- references --> | ||
|
|
||
| [Semver]: https://semver.org/ | ||
|
|
||
| ## How publishing happens? | ||
|
|
||
| TODO(polina-c): add information, https://github.com/google/A2UI/issues/1383 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # Authoring pull requests | ||
|
|
||
| ## Make your PR easy to review | ||
|
|
||
| 1. Make sure your PR has meaningful title and description. | ||
| 2. Make sure your PR is not too large. Smaller PRs are easier to review. | ||
| 3. Separate code reorgs from feature changes. | ||
|
|
||
| ## CI presubmit errors | ||
|
|
||
| You may get CI presubmit errors on pull requests for several reasons. This section explains how to fix some of the less obvious ones. | ||
|
|
||
| ### From `publish / validate` job | ||
|
|
||
| In general, the job checks if all [pub.dev](https://pub.dev) packages are release ready. | ||
|
|
||
| See [publishing.md](publishing.md) for more details. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| # `a2ui_core` Changelog | ||
|
|
||
| ## 0.0.1 (in progress) | ||
| ## 0.0.1-dev002 | ||
|
|
||
| - Initial version. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| submodules/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| # `genui` Changelog | ||
|
|
||
| ## (WIP) | ||
| ## 0.9.1 | ||
|
|
||
| - **Feature**: Updated example/README.md. | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.