Skip to content

Commit 642a993

Browse files
committed
building sdist
1 parent 8695461 commit 642a993

File tree

1 file changed

+36
-3
lines changed

1 file changed

+36
-3
lines changed

.github/workflows/build_wheels.yml

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,42 @@ jobs:
247247
path: ./quaddtype/wheelhouse/*.whl
248248
name: wheels-windows-${{ matrix.architecture }}
249249

250+
build_sdist:
251+
name: Build SDist
252+
runs-on: ubuntu-latest
253+
steps:
254+
- uses: actions/checkout@v4
255+
with:
256+
submodules: recursive
257+
258+
- name: Set up Python
259+
uses: actions/setup-python@v4
260+
with:
261+
python-version: ">=3.11.0"
262+
263+
- name: Install build dependencies
264+
run: |
265+
python -m pip install --upgrade pip
266+
python -m pip install build
267+
268+
- name: Build SDist
269+
run: python -m build --sdist --outdir dist/
270+
working-directory: ./quaddtype
271+
272+
- name: Upload SDist artifact
273+
uses: actions/upload-artifact@v4
274+
with:
275+
name: sdist
276+
path: ./quaddtype/dist/*.tar.gz
277+
250278
publish_to_pypi:
251279
name: Publish to PyPI
252-
needs: [build_wheels_linux, build_wheels_macos, build_wheels_windows]
280+
needs: [
281+
build_wheels_linux,
282+
build_wheels_macos,
283+
build_wheels_windows,
284+
build_sdist,
285+
] # ← Add build_sdist here
253286
runs-on: ubuntu-latest
254287
if: startsWith(github.ref, 'refs/tags/quaddtype-v')
255288

@@ -264,9 +297,9 @@ jobs:
264297
- name: Download all workflow run artifacts
265298
uses: actions/download-artifact@v4
266299
with:
300+
pattern: "*"
267301
path: dist
302+
merge-multiple: true
268303

269304
- name: Publish to PyPI
270305
uses: pypa/gh-action-pypi-publish@release/v1
271-
with:
272-
packages-dir: dist/*

0 commit comments

Comments
 (0)