Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ The project includes protobuf code generation for examples and tests:
uv run just generate
```

## Releasing

To release a new version, follow the guide in [RELEASE.md](./RELEASE.md).

## Documentation

### Building Documentation
Expand Down
32 changes: 32 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Releasing connect-python

This document outlines how to create a release of connect-python.

1. Clone the repo, ensuring you have the latest main.

2. On a new branch, update version strings with the `bump` command, either to the next minor or patch version, based on the changes that are included in this new release.

- If there are only bug fixes and no new features, run `uv run just bump patch`.
- If there are features being released, run `uv run just bump minor`.

Note the new version X.Y.Z in the updated files.

3. Open a PR titled "Prepare for vX.Y.Z" ([Example PR #661](https://github.com/connectrpc/connect-go/pull/661)) and a description tagging all current maintainers. Once it's reviewed and CI passes, merge it.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will update to a connect-python URL after the next release


_Make sure no new commits are merged until the release is complete._

4. Review all commits in the new release and for each PR check an appropriate label is used and edit the title to be meaningful to end users. This will help auto-generated release notes match the final notes as closely as possible.

5. Using the Github UI, create a new release.

- Under “Select tag”, type in “vX.Y.Z” to create a new tag for the release upon publish.
- Target the main branch.
- Title the Release “vX.Y.Z”.
- Click “set as latest release”.
- Set the last version as the “Previous tag”.
- Click “Generate release notes” to autogenerate release notes.
- Edit the release notes. A summary and other sub categories may be added if required but should, in most cases, be left as ### Enhancements and ### Bugfixes. Feel free to collect multiple small changes to docs or Github config into one line, but try to tag every contributor. Make especially sure to credit new external contributors!

6. Publish the release.

[latest release]: https://github.com/connectrpc/connect-python/releases/latest
7 changes: 6 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,9 @@ generate: generate-conformance generate-example generate-test format

# Used in CI to verify that `just generate` doesn't produce a diff
checkgenerate: generate
test -z "$(git status --porcelain | tee /dev/stderr)"
test -z "$(git status --porcelain | tee /dev/stderr)"

bump *args:
uv run bump-my-version bump {{args}}
uv lock
cd protoc-gen-connect-python && uv lock
17 changes: 17 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Issues = "https://github.com/connectrpc/connect-python/issues"
dev = [
"asgiref==3.9.1",
"brotli==1.1.0",
"bump-my-version==1.2.4",
"connect-python-example",
"daphne==4.2.1",
"httpx[http2]==0.28.1",
Expand Down Expand Up @@ -233,3 +234,19 @@ members = ["example", "noextras"]
[tool.uv.sources]
connect-python = { workspace = true }
connect-python-example = { workspace = true }

[tool.bumpversion]
current_version = "0.5.0"
files = [
{ filename = "pyproject.toml" },
{ filename = "protoc-gen-connect-python/pyproject.toml" },
]
parse = "(?P<major>\\d+)\\.(?P<minor>\\d+)\\.(?P<patch>\\d+)"
serialize = ["{major}.{minor}.{patch}"]
search = "version = \"{current_version}\""
replace = "version = \"{new_version}\""
regex = false
tag = false
allow_dirty = false
ignore_missing_version = false
commit = false
Loading