Skip to content

Commit 6e314af

Browse files
committed
ci: add GitHub Actions workflow for PyPI publishing
Automated publishing to PyPI when a version tag (v*) is pushed. Requires PYPI_TOKEN secret to be configured. Closes #126
1 parent 9f11ba6 commit 6e314af

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
id-token: write
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- uses: actions/setup-python@v5
17+
with:
18+
python-version: '3.12'
19+
20+
- name: Install build tools
21+
run: pip install build twine
22+
23+
- name: Build package
24+
run: python -m build
25+
26+
- name: Publish to PyPI
27+
run: twine upload dist/*
28+
env:
29+
TWINE_USERNAME: __token__
30+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}

0 commit comments

Comments
 (0)