Skip to content

Commit 5a5d4ab

Browse files
committed
Add GitHub Actions workflow for publishing to PyPI
1 parent b65804d commit 5a5d4ab

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/publish.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build-and-publish:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- name: Set up Python
12+
uses: actions/setup-python@v5
13+
with:
14+
python-version: '3.11'
15+
- name: Install build dependencies
16+
run: |
17+
python -m pip install --upgrade pip
18+
pip install build twine
19+
- name: Build package
20+
run: |
21+
python -m build
22+
- name: Publish to PyPI
23+
env:
24+
TWINE_API_KEY: ${{ secrets.PYPI_API_TOKEN }}
25+
run: |
26+
twine upload --non-interactive -u __token__ -p "$TWINE_API_KEY" dist/*

0 commit comments

Comments
 (0)