Skip to content

Commit 49216e6

Browse files
bloveclaude
andcommitted
ci: publish threadplane-middleware with uv, ending the twine metadata skew
The real-release path used the pinned pypa/gh-action-pypi-publish image, whose bundled twine rejects the Metadata-Version 2.5 that current uv build emits: 'InvalidDistribution: 2.5 is not a valid metadata version'. The dry-run path already used uv publish and passed — the two paths disagreed about the artifact between them. Observed on the first real 0.0.2 publish attempt (dry-run green, real release red, nothing uploaded). Build, dry-run, and publish now share one toolchain. PyPI trusted publishing binds to repo + workflow filename, not the action, so the same OIDC grant works; uv consumes it via --trusted-publishing always. Trade-off, stated: the pypa action also uploaded PEP 740 attestations. uv publish does not yet; losing them is acceptable against a publish path that cannot ship at all. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 2414766 commit 49216e6

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

.github/workflows/publish-middleware-python.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,14 @@ jobs:
7676
working-directory: packages/threadplane-middleware
7777
run: uv publish --dry-run dist/*
7878

79+
# uv publish, not the pypa action: the pinned action image's twine
80+
# rejected the Metadata-Version 2.5 that current `uv build` emits
81+
# ("InvalidDistribution: '2.5' is not a valid metadata version"), while
82+
# the dry-run path — which already uses uv — passed. One toolchain for
83+
# build, dry-run, and publish removes that skew permanently. PyPI
84+
# trusted publishing is bound to repo + workflow filename, so the same
85+
# OIDC token works; uv picks it up via --trusted-publishing.
7986
- name: Publish to PyPI (real release — OIDC trusted publishing)
8087
if: ${{ inputs.dry_run == false }}
81-
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1
82-
with:
83-
packages-dir: packages/threadplane-middleware/dist
84-
attestations: true
88+
working-directory: packages/threadplane-middleware
89+
run: uv publish --trusted-publishing always dist/*

0 commit comments

Comments
 (0)