Skip to content

Commit 3a84203

Browse files
petfoldclaude
andcommitted
Release workflow: token-less PyPI publish via Trusted Publishers
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 3ac1646 commit 3a84203

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Release to PyPI
2+
3+
# Token-less publishing via PyPI Trusted Publishers: PyPI trusts this
4+
# exact repo+workflow (configured at pypi.org/manage/account/publishing/),
5+
# so no credentials are stored anywhere. Trigger manually from the
6+
# Actions tab (or `gh workflow run release.yml`).
7+
8+
on:
9+
workflow_dispatch:
10+
release:
11+
types: [published]
12+
13+
jobs:
14+
publish:
15+
runs-on: ubuntu-latest
16+
permissions:
17+
id-token: write # the OIDC handshake with PyPI
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: actions/setup-python@v5
21+
with:
22+
python-version: "3.12"
23+
- run: pip install build && python -m build
24+
- uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)