Skip to content

Commit 69ba58f

Browse files
committed
Build sdist and upload to pypi
1 parent 052099a commit 69ba58f

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/wheel.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,37 @@ jobs:
3737
with:
3838
name: wheels
3939
path: ./wheelhouse
40+
41+
build_sdist:
42+
name: Build source distribution
43+
runs-on: ubuntu-latest
44+
steps:
45+
- uses: actions/checkout@v2
46+
47+
- uses: actions/setup-python@v2
48+
name: Install Python
49+
with:
50+
python-version: '3.7'
51+
52+
- name: Build sdist
53+
run: python setup.py sdist
54+
55+
- uses: actions/upload-artifact@v2
56+
with:
57+
path: dist/*.tar.gz
58+
59+
upload_pypi:
60+
needs: [build_wheels, build_sdist]
61+
runs-on: ubuntu-latest
62+
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
63+
steps:
64+
- uses: actions/download-artifact@v2
65+
with:
66+
name: artifact
67+
path: dist
68+
69+
- uses: pypa/gh-action-pypi-publish@master
70+
with:
71+
user: __token__
72+
password: ${{ secrets.pypi_password }}
73+
# To test: repository_url: https://test.pypi.org/legacy/

0 commit comments

Comments
 (0)