Skip to content

Commit 9a57fc5

Browse files
committed
Include sdist
1 parent 01ab666 commit 9a57fc5

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,13 @@ jobs:
3838
path: wheelhouse/*.whl
3939

4040
publish:
41-
# Wait for all platforms to build, then publish wheels.
41+
# Wait for all platforms to build, then publish wheels and a source distribution.
4242
needs: build_wheels
4343
runs-on: ubuntu-latest
4444

4545
steps:
46+
- uses: actions/checkout@v4
47+
4648
- name: Download wheels (Ubuntu)
4749
uses: actions/download-artifact@v4
4850
with:
@@ -61,10 +63,15 @@ jobs:
6163
name: wheels-windows-latest
6264
path: wheels
6365

64-
- name: Publish wheels to PyPI
66+
- name: Build source distribution
67+
run: |
68+
python -m pip install --upgrade pip setuptools wheel build
69+
python -m build --sdist --outdir sdist
70+
71+
- name: Publish wheels and source distribution to PyPI
6572
run: |
6673
python -m pip install --upgrade pip setuptools wheel twine
67-
twine upload wheels/*.whl
74+
twine upload wheels/*.whl sdist/*.tar.gz
6875
env:
6976
TWINE_USERNAME: __token__
7077
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)