Unless otherwise noted, follow the guidance here: https://github.com/dart-lang/sdk/wiki/External-Package-Maintenance
The most important rules are:
- Never publish anything that is not committed.
- Never commit anything that hasn't been reviewed and approved.
It's critical to keep in mind that in the Dart package ecosystem, publishing is forever. This means special care has to be taken to make sure that everything is correct before a package is published. The Dart team has spent hours and in some cases days fixing problems due to a mistake when publishing. It is hard to be too careful here.
Assuming that we want to release both functions_framework and functions_framework_builder at the same time, follow these steps.
- Prepare a PR to release
functions_framework
.- Remove the
-dev
frompubspec.yaml
andCHANGELOG.md
.
- Remove the
- Get the PR approved and commit it.
- Publish
functions_framework
. - Tag the commit with the package name and version.
- The tag should be in the format of
[package_name]-v[version]
. - e.g.
functions_framework-v1.2.3
- The tag should be in the format of
- Prepare a PR to release
functions_framework_builder
- Make sure to remove the
dev_dependencies
section and update the dependency onfunctions_framework
to the just published version. - Remove the
-dev
frompubspec.yaml
andCHANGELOG.md
.
- Make sure to remove the
- Get the PR approved and commit it.
- Publish
functions_framework_builder
. - Tag the commit with the package name and version.
- Prepare a PR to update the examples to the latest stable versions.
- Make sure that
pub upgrade
actually resolves to the just published versions.
- Make sure that
- Get the PR approved and commit it.