This Dart-based command-line tool automates the package publishing process for this monorepo using a safe, two-stage workflow.
Make sure you have 'admin' permissions for the labs.flutter.dev publisher, which you can verify on the admin page.
If you do not have permissions, ask an existing admin from the linked page to add you.
The process is a two-stage publish workflow. It is split into two distinct commands, bump and publish,
to separate release preparation from the act of publishing.
Before running bump, make sure you are using the latest Flutter stable release, and update dependencies to the latest stable versions. This can be done by running:
dart pub upgrade --major-versionsAlso, use Antigravity or Gemini CLI to update CHANGELOG.md files. You can use a prompt like:
Look at the git diffs since the <previous tag> tag and add any missing changelog entries for breaking and other changes to each of the packages which have CHANGELOG.md files.Where <previous tag> is the tag of the previous release. For example, if the previous release was genui-0.6.1, then the command would be:
Look at the git diffs since the genui-0.6.1 tag and add any missing changelog entries for breaking and other changes to each of the packages which have CHANGELOG.md files.First, run the bump command to prepare the repository for a new release. This will bump the version numbers, finalize the changelogs, and upgrade dependencies. After running this command, you should review the changes, make any necessary manual adjustments, and then commit the changes to your version control system.
Syntax:
dart run tool/release/bin/release.dart bump --level <level><level> can be one of:
breaking: Increments the major version for breaking changes.major: Increments the major version.minor: Increments the minor version for new features.patch: Increments the patch version for bug fixes.
After you have committed the changes from the bump command, you can publish the new version. The publish command will publish the packages, create git tags, and then prepare the repository for the next development cycle by adding a new (in progress) section to top of the CHANGELOG.md files.
By default, publish runs in dry-run mode, which simulates the publish process without actually uploading packages.
Command:
dart run tool/release/bin/release.dart publishTo perform a real publish, use the --force flag. The tool will first perform a dry run. If successful, it will prompt for confirmation before proceeding.
Command:
dart run tool/release/bin/release.dart publish --forceAfter a successful publish, the tool will create local git tags for each published package and print the command needed to push them to the remote repository. You should then push the tags, and commit the new changes to the CHANGELOG.md files to start the next development cycle.