Skip to content

Commit f211eff

Browse files
committed
Add workflow for publishing on PyPI
Signed-off-by: Nikola Forró <[email protected]>
1 parent 8af3d3d commit f211eff

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/pypi-publish.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Upload a Python package when a release is created
2+
# https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows
3+
4+
name: Publish Python 🐍 distributions 📦 to PyPI
5+
6+
on:
7+
release:
8+
types: [created]
9+
10+
jobs:
11+
build-n-publish:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- uses: actions/setup-python@v2
17+
18+
- name: Build a source tarball and a binary wheel
19+
# https://pypa-build.readthedocs.io
20+
run: |
21+
python -m pip install build
22+
python -m build --sdist --wheel
23+
24+
- name: Publish 📦 to PyPI
25+
# https://github.com/pypa/gh-action-pypi-publish
26+
uses: pypa/gh-action-pypi-publish@release/v1
27+
with:
28+
password: ${{ secrets.PYPI_API_TOKEN }}
29+
verbose: true

0 commit comments

Comments
 (0)