Skip to content

Commit 77a1624

Browse files
committed
Add pypi workflow
1 parent 4221b06 commit 77a1624

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/deploy.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
tags: ["*"]
6+
workflow_dispatch:
7+
8+
jobs:
9+
build-n-publish:
10+
name: Build and publish Python 🐍 distributions 📦 to PyPI
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-python@v5
15+
with:
16+
python-version: "3.x"
17+
- name: Build a binary wheel and a source tarball
18+
run: |
19+
python -m pip install -U pip
20+
python -m pip install build
21+
python -m build --sdist --wheel --outdir dist/
22+
- name: Publish to PyPI
23+
if: startsWith(github.ref, 'refs/tags')
24+
uses: pypa/gh-action-pypi-publish@release/v1
25+
with:
26+
password: ${{ secrets.PYPI_API_TOKEN }}
27+
- uses: softprops/action-gh-release@v2
28+
with:
29+
generate_release_notes: true

0 commit comments

Comments
 (0)