There was an error while loading. Please reload this page.
1 parent 9de844f commit 4d81ae7Copy full SHA for 4d81ae7
1 file changed
.github/workflows/pypi-release.yml
@@ -0,0 +1,32 @@
1
+name: Build Python distributions and publish on PyPI
2
+
3
+on:
4
+ workflow_dispatch:
5
+ push:
6
+ tags:
7
+ - "v*.*.*"
8
9
+jobs:
10
+ build-and-publish:
11
+ name: Build and publish library to PyPI
12
+ runs-on: ubuntu-latest
13
14
+ steps:
15
+ - uses: actions/checkout@v3
16
17
+ - name: Set up Python
18
+ uses: actions/setup-python@v4
19
+ with:
20
+ python-version: 3.11
21
22
+ - name: Install pypa/build
23
+ run: python -m pip install build --user
24
25
+ - name: Build a binary wheel and a source tarball
26
+ run: python -m build --sdist --wheel --outdir dist/ .
27
28
+ - name: Publish to PyPI
29
+ if: startsWith(github.ref, 'refs/tags')
30
+ uses: pypa/gh-action-pypi-publish@release/v1
31
32
+ password: ${{ secrets.PYPI_API_TOKEN }}
0 commit comments