5555
5656 - uses : actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0
5757 with :
58- go-version-file : go.work
58+ go-version-file : protoc-gen-connect-python/ go.mod
5959 cache-dependency-path : " **/go.mod"
6060
6161 - run : uv sync
@@ -68,28 +68,70 @@ jobs:
6868 uv run pyright
6969
7070 - name : run python tests
71- run : uv run pytest ${{ matrix.coverage == 'cov' && '--cov=connecpy --cov-report=xml' || '' }}
71+ run : uv run pytest ${{ matrix.coverage == 'cov' && '--cov=connectrpc --cov-report=xml' || '' }}
7272
7373 - name : run conformance tests
7474 # TODO: Debug stdin/stdout issues on Windows
7575 if : ${{ !startsWith(matrix.os, 'windows-') }}
76- run : uv run pytest ${{ matrix.coverage == 'cov' && '--cov=connecpy --cov-report=xml' || '' }}
76+ run : uv run pytest ${{ matrix.coverage == 'cov' && '--cov=connectrpc --cov-report=xml' || '' }}
7777 working-directory : conformance
7878
7979 - name : run tests with minimal dependencies
80- run : uv run --exact pytest ${{ matrix.coverage == 'cov' && '--cov=connecpy --cov-report=xml' || '' }}
80+ run : uv run --exact pytest ${{ matrix.coverage == 'cov' && '--cov=connectrpc --cov-report=xml' || '' }}
8181 working-directory : noextras
8282
8383 - name : run Go tests
8484 run : go test ./...
85- working-directory : protoc-gen-connecpy
85+ working-directory : protoc-gen-connect-python
8686
87- - name : build Go archives
88- if : ${{ startsWith(matrix.os, 'ubuntu-') }}
87+ - uses : codecov/codecov-action@v5
88+ if : ${{ matrix.coverage == 'cov' }}
89+
90+ publish :
91+ runs-on : ubuntu-24.04
92+ needs : build
93+ steps :
94+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
95+
96+ - uses : astral-sh/setup-uv@4959332f0f014c5280e7eac8b70c90cb574c9f9b # v6.6.0
97+
98+ - uses : actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
99+ with :
100+ python-version-file : pyproject.toml
101+
102+ - run : uv sync --frozen
103+
104+ - name : Modify package name for TestPyPI
105+ run : |
106+ # The 'connect-python' name is claimed on TestPyPI. No big
107+ # deal, we can use a different name since this is just to test
108+ # publishing really.
109+ # TODO: Update now that this is in connectrpc
110+ sed -i 's/name = "connect-python"/name = "firetiger-connect-python"/' pyproject.toml
111+
112+ - run : uv build
113+
114+ - name : build codegen archives
89115 uses : goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0
90116 with :
91117 version : " ~> v2"
92118 args : release --snapshot --clean
119+ workdir : protoc-gen-connect-python
93120
94- - uses : codecov/codecov-action@v5
95- if : ${{ matrix.coverage == 'cov' }}
121+ - run : |
122+ uv sync --frozen
123+ uv run python scripts/generate_wheels.py
124+ working-directory: protoc-gen-connect-python
125+
126+ - uses : pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
127+ if : github.event_name != 'pull_request'
128+ with :
129+ repository-url : https://test.pypi.org/legacy/
130+ skip-existing : true
131+
132+ - name : publish protoc-gen-connect-python
133+ uses : pypa/gh-action-pypi-publish@76f52bc884231f62b9a034ebfe128415bbaabdfc # v1.12.4
134+ if : github.event_name != 'pull_request'
135+ with :
136+ packages-dir : protoc-gen-connect-python/dist
137+ skip-existing : true
0 commit comments