Skip to content

Commit 8a34076

Browse files
committed
chore: add PyPI release workflow
Triggered on v* tags. Builds sdist + wheel, publishes via pypa/gh-action-pypi-publish. Requires PYPI_API_TOKEN secret.
1 parent bc0d023 commit 8a34076

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
id-token: write
11+
12+
jobs:
13+
publish:
14+
name: Publish to PyPI
15+
runs-on: ubuntu-latest
16+
environment: pypi
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- uses: actions/setup-python@v5
21+
with:
22+
python-version: "3.12"
23+
24+
- name: Install build tools
25+
run: pip install build
26+
27+
- name: Build package
28+
run: python -m build
29+
30+
- name: Publish to PyPI
31+
uses: pypa/gh-action-pypi-publish@release/v1
32+
with:
33+
password: ${{ secrets.PYPI_API_TOKEN }}
34+
35+
- name: Create GitHub Release
36+
uses: softprops/action-gh-release@v2
37+
with:
38+
generate_release_notes: true

0 commit comments

Comments
 (0)