Skip to content

Commit b76a5dc

Browse files
CI: Publish sdist as well as wheels (#126)
1 parent 03edc25 commit b76a5dc

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/build-release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,33 @@ jobs:
4747
python -m pip install twine
4848
python -m twine check --strict wheelhouse/*.whl
4949
python -m twine upload wheelhouse/*.whl
50+
51+
build-sdist:
52+
runs-on: ubuntu-latest
53+
54+
steps:
55+
- name: Check out the release commit
56+
uses: actions/checkout@v3
57+
58+
- name: Set up Python
59+
uses: actions/setup-python@v4
60+
with:
61+
python-version: '3.11'
62+
63+
- name: Install Python packages needed for build and upload
64+
run: |
65+
python -m pip install build twine
66+
67+
- name: Build sdist
68+
run: |
69+
python -m build --sdist
70+
71+
- name: Publish to PyPI
72+
73+
env:
74+
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
75+
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
76+
77+
run: |
78+
python -m twine check --strict dist/*
79+
python -m twine upload dist/*

0 commit comments

Comments
 (0)