Skip to content

Commit 9178442

Browse files
whtskyclaude
andcommitted
Add PyPI trusted publishing via OIDC for tag builds
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 383b1eb commit 9178442

1 file changed

Lines changed: 21 additions & 1 deletion

File tree

.github/workflows/build.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,24 @@ jobs:
4444
- uses: actions/upload-artifact@v6
4545
with:
4646
name: sdist
47-
path: dist/*.tar.gz
47+
path: dist/*.tar.gz
48+
49+
publish:
50+
name: Publish to PyPI
51+
runs-on: ubuntu-latest
52+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
53+
needs: [build_wheels, make_sdist]
54+
environment:
55+
name: release
56+
url: https://pypi.org/p/bencoder.pyx
57+
permissions:
58+
id-token: write
59+
steps:
60+
- name: Download all artifacts
61+
uses: actions/download-artifact@v6
62+
with:
63+
path: dist/
64+
merge-multiple: true
65+
66+
- name: Publish to PyPI
67+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)