Skip to content

Commit 7938bdc

Browse files
committed
feat: add GitHub Actions workflow for publishing to PyPI
1 parent a9744c2 commit 7938bdc

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/publish-pypi.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
workflow_dispatch:
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: '3.11'
20+
21+
- name: Install uv
22+
run: |
23+
curl -LsSf https://astral.sh/uv/install.sh | sh
24+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
25+
26+
- name: Install dependencies
27+
run: |
28+
uv pip install --system build twine
29+
30+
- name: Build package
31+
run: python -m build
32+
33+
- name: Publish to PyPI
34+
uses: pypa/gh-action-pypi-publish@release/v1
35+
with:
36+
password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)