Skip to content

Commit dd8268e

Browse files
committed
feat(ci): switch to uv publish for PyPI uploads
Signed-off-by: William Woodruff <[email protected]>
1 parent c4935a7 commit dd8268e

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

.github/workflows/pypi-publish.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,16 @@ jobs:
5151
- run: |
5252
find tmpdist/ -type f -name 'cryptography*' -exec mv {} dist/ \;
5353
54+
- uses: astral-sh/attest-action@2c727738cea36d6c97dd85eb133ea0e0e8fe754b # v0.0.4
55+
# Do not perform attestation for things for TestPyPI. This is
56+
# because there's nothing that would prevent a malicious PyPI from
57+
# serving a signed TestPyPI asset in place of a release intended for
58+
# PyPI.
59+
if: env.PYPI_URL == 'https://upload.pypi.org/legacy/'
60+
5461
- name: Publish package distributions to PyPI
55-
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
56-
with:
57-
repository-url: ${{ env.PYPI_URL }}
58-
skip-existing: true
59-
# Do not perform attestation for things for TestPyPI. This is
60-
# because there's nothing that would prevent a malicious PyPI from
61-
# serving a signed TestPyPI asset in place of a release intended for
62-
# PyPI.
63-
attestations: ${{ env.PYPI_URL == 'https://upload.pypi.org/legacy/' }}
62+
# uv is present because attest-action installs it.
63+
run: |
64+
uv publish --trusted-publishing=always dist/*
65+
env:
66+
UV_PUBLISH_URL: ${{ env.PYPI_URL }}

0 commit comments

Comments
 (0)