Skip to content

Commit 1ac8beb

Browse files
tsubakikyzchee
andauthored
github: add publish to pypi (#101)
Co-authored-by: Koichi Shiraishi <[email protected]>
1 parent a90ce8c commit 1ac8beb

File tree

10 files changed

+44
-18
lines changed

10 files changed

+44
-18
lines changed

.github/workflows/publish.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Build and release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
pypi-publish:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
id-token: write
12+
contents: read
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Install uv
18+
uses: astral-sh/setup-uv@v6
19+
with:
20+
enable-cache: true
21+
22+
- name: Build package
23+
run: uv build
24+
25+
- name: Publish package to PyPi
26+
run: uv publish --trusted-publishing always

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Connect is a simple, reliable, and interoperable RPC framework that combines the
1414
## Installation
1515

1616
```bash
17-
pip install connect-python
17+
pip install connect-py
1818
```
1919

2020
**⚠️ Dependency Notice**: For gRPC/gRPC-Web support, this package uses forked libraries:
@@ -266,7 +266,7 @@ This project includes a Protocol Buffer plugin (`protoc-gen-connect-python`) wri
266266

267267
## Contributing
268268

269-
We warmly welcome and greatly value contributions to the connect-python. However, before diving in, we kindly request that you take a moment to review our Contribution Guidelines.
269+
We warmly welcome and greatly value contributions to the connect-py. However, before diving in, we kindly request that you take a moment to review our Contribution Guidelines.
270270

271271
Additionally, please carefully read the Contributor License Agreement (CLA) before submitting your contribution to Gaudiy. By submitting your contribution, you are considered to have accepted and agreed to be bound by the terms and conditions outlined in the CLA, regardless of circumstances.
272272

conformance/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ authors = [{ name = "tsubakiky", email = "[email protected]" }]
77
requires-python = ">=3.13"
88
dependencies = [
99
"anyio>=4.8.0",
10-
"connect-python",
10+
"connect-py",
1111
"cryptography>=44.0.2",
1212
"hypercorn",
1313
]
1414

1515
[tool.uv.sources]
16-
connect-python = { path = "../" }
16+
connect-py = { path = "../" }
1717
hypercorn = { git = "https://github.com/tsubakiky/hypercorn" }
1818

1919
[dependency-groups]

conformance/uv.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
[project]
2-
name = "connect-python-examples"
2+
name = "connect-py-examples"
33
description = "The Python implementation of Connect: Protobuf RPC that works."
44
readme = "README.md"
55
license = { text = "Apache-2.0" }
66
authors = [{ name = "tsubakiky", email = "[email protected]" }]
77
requires-python = ">=3.13"
88
version = "0.1.0"
9-
dependencies = ["connect-python", "hypercorn"]
9+
dependencies = ["connect-py", "hypercorn"]
1010

1111
[tool.uv]
1212
dev-dependencies = ["mypy>=1.13.0", "pyright>=1.1.390", "ruff>=0.8.2"]
1313

1414
[tool.uv.sources]
15-
connect-python = { path = "../" }
15+
connect-py = { path = "../" }
1616
hypercorn = { git = "https://github.com/tsubakiky/hypercorn" }
1717

1818
[tool.ruff]

examples/uv.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ requires = ["hatchling"]
33
build-backend = "hatchling.build"
44

55
[project]
6-
name = "connect-python"
6+
name = "connect-py"
77
description = "The Python implementation of Connect: Protobuf RPC that works."
88
readme = "README.md"
99
license = { text = "Apache-2.0" }

src/connect/protocol_connect/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@
4141
CONNECT_UNARY_CONNECT_QUERY_VALUE = "v" + CONNECT_PROTOCOL_VERSION
4242

4343
_python_version = f"{sys.version_info.major}.{sys.version_info.minor}"
44-
DEFAULT_CONNECT_USER_AGENT = f"connect-python/{__version__} (Python/{_python_version})"
44+
DEFAULT_CONNECT_USER_AGENT = f"connect-py/{__version__} (Python/{_python_version})"

src/connect/protocol_grpc/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
GRPC_ALLOWED_METHODS = [HTTPMethod.POST]
4040
_python_version = f"{sys.version_info.major}.{sys.version_info.minor}"
41-
DEFAULT_GRPC_USER_AGENT = f"connect-python/{__version__} (Python/{_python_version})"
41+
DEFAULT_GRPC_USER_AGENT = f"connect-py/{__version__} (Python/{_python_version})"
4242

4343
RE_TIMEOUT = re.compile(r"^(\d{1,8})([HMSmun])$")
4444

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)