File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish Python to PyPI
2
+
3
+ # Based on: https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
4
+
5
+ on : workflow_dispatch
6
+
7
+ jobs :
8
+ build-n-publish :
9
+ name : Build and publish
10
+ runs-on : ubuntu-latest
11
+
12
+ steps :
13
+ - uses : actions/checkout@v3
14
+ - name : Set up Python
15
+ uses : actions/setup-python@v4
16
+ with :
17
+ python-version : " 3.8"
18
+ - name : Install dependencies
19
+ run : |
20
+ python -m pip install --upgrade pip pytest cmake scikit-build setuptools
21
+ - name : Build source distribution
22
+ run : |
23
+ python setup.py sdist
24
+ - name : Publish distribution to PyPI
25
+ # TODO: move to tag based releases
26
+ # if: startsWith(github.ref, 'refs/tags')
27
+ uses : pypa/gh-action-pypi-publish@release/v1
28
+ with :
29
+ password : ${{ secrets.PYPI_API_TOKEN }}
You can’t perform that action at this time.
0 commit comments