Skip to content

Commit 4be0603

Browse files
committed
github: add publish to pypi
1 parent 86a5829 commit 4be0603

9 files changed

Lines changed: 48 additions & 14 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Build and release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
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: Check if lockfile is up to date
23+
run: uv lock --check
24+
25+
- name: Build package
26+
run: uv build
27+
28+
- name: Release to Github
29+
uses: softprops/action-gh-release@v2
30+
with:
31+
files: dist/*.whl
32+
33+
- name: Publish package to PyPi
34+
run: uv publish --trusted-publishing always

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Contributing to Connect Python
22

3-
Thank you for contributing to connect-python! Please read the [Contributor License Agreement (CLA)](https://site.gaudiy.com/contributor-license-agreement) before submitting any contributions.
3+
Thank you for contributing to connect-py! Please read the [Contributor License Agreement (CLA)](https://site.gaudiy.com/contributor-license-agreement) before submitting any contributions.
44

55
## Development Setup
66

@@ -9,8 +9,8 @@ Thank you for contributing to connect-python! Please read the [Contributor Licen
99

1010
**Setup:**
1111
```bash
12-
git clone https://github.com/YOUR_USERNAME/connect-python.git
13-
cd connect-python
12+
git clone https://github.com/YOUR_USERNAME/connect-py.git
13+
cd connect-py
1414
uv sync
1515

1616
go build -o ./bin/protoc-gen-connect-python -v -x ./cmd/protoc-gen-connect-python

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 = "salovers1205@gmail.com" }]
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]

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 = "salovers1205@gmail.com" }]
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]

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
@@ -25,4 +25,4 @@
2525
CONNECT_UNARY_CONNECT_QUERY_VALUE = "v" + CONNECT_PROTOCOL_VERSION
2626

2727
_python_version = f"{sys.version_info.major}.{sys.version_info.minor}"
28-
DEFAULT_CONNECT_USER_AGENT = f"connect-python/{__version__} (Python/{_python_version})"
28+
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
@@ -22,7 +22,7 @@
2222

2323
GRPC_ALLOWED_METHODS = [HTTPMethod.POST]
2424
_python_version = f"{sys.version_info.major}.{sys.version_info.minor}"
25-
DEFAULT_GRPC_USER_AGENT = f"connect-python/{__version__} (Python/{_python_version})"
25+
DEFAULT_GRPC_USER_AGENT = f"connect-py/{__version__} (Python/{_python_version})"
2626

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

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)