This applies to maintainers preparing a new release.
- The
gh
cli is installed and ready for use: - Your development environment is setup (you've run
make install
) and you have the necessary dev dependencies (likerequests
) installed.
- Run
uv run release/prepare.py {VERSION}
from the root of the repository. This will:- Update the version number in the
pyproject.toml
files in the root and inlogfire-api
. - Add a new section to CHANGELOG.md with a title containing the version number tag and current date.
- Add a line at the end of this section that looks something like [v1.0.1]: https://github.com/pydantic/logfire/compare/v{PREV_VERSION}...v1.0.1 but with the correct version number tags.
- Update the version number in the
- Curate the changes in CHANGELOG.md:
- Make sure the markdown is valid; in particular, check text that should be in code-blocks is.
- Mark any breaking changes with Breaking Change:.
- Deduplicate the packaging entries to include only the most recent version bumps for each package.
- Run
uv run release/push.py
from the root of the repository. This will:- Create a PR with the changes you made in the previous steps.
- Add a label to the PR to indicate that it's a release PR.
- Open a draft release on GitHub with the changes you made in the previous steps.
- Review the PR and merge it.
- Publish the release and wait for the CI to finish building and publishing the new version.
If you're doing a release from a branch other than main
, we'd recommend just going through the release process manually.
- Update generated stubs just in case it should have been done in a previous PR via
make generate-stubs
. - Create a GitHub release draft with a new version number tag, generate release notes, and edit them to exclude irrelevant things like docs updates.
- Add a new section to CHANGELOG.md with a title containing the version number tag and current date, and copy in the release notes.
- Add a line to the end of the file that looks something like [v1.0.1]: https://github.com/pydantic/logfire/compare/v1.0.0...v1.0.1 but with the correct version number tags.
- Update the version number in the two
pyproject.toml
files in the root and inlogfire-api
. - Push and merge a PR with these changes.
- Publish the GitHub release draft and wait for the CI to finish building and publishing the new version.