Skip to content

Commit 3e2c3b5

Browse files
committed
workflows: generate sdist tarball in CI
By omitting the `python -m build` -w argument in one job, verify that the source tarball can successfully build a wheel. Use that source tarball in releases rather than building it on a developer's machine. Signed-off-by: Benjamin Gilbert <bgilbert@cs.cmu.edu>
1 parent d6af87d commit 3e2c3b5

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

‎.github/ISSUE_TEMPLATE/release.md‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
- [ ] `git clean -dxf && mkdir dist`
66
- [ ] Find the [workflow run](https://github.com/openslide/openslide-python/actions) for the tag; download its docs and wheels artifacts
77
- [ ] `unzip /path/to/downloaded/openslide-python-wheels.zip && mv openslide-python-wheels-*/* dist/`
8-
- [ ] `python setup.py sdist`
98
- [ ] `twine upload dist/*`
109
- [ ] Recompress tarball with `xz`
1110
- [ ] Attach release notes to [GitHub release](https://github.com/openslide/openslide-python/releases/new); upload tarballs and wheels

‎.github/workflows/python.yml‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ jobs:
3232
os: [ubuntu-latest, macos-latest]
3333
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]
3434
include:
35+
- os: ubuntu-latest
36+
python-version: "3.12"
37+
sdist: sdist
3538
# Python 3.8 is too old to support universal binaries, and
3639
# setup-python's Python 3.9 and 3.10 won't build them. Use the
3740
# last upstream patch releases that ship with installers.
@@ -82,7 +85,10 @@ jobs:
8285
esac
8386
- name: Build wheel
8487
run: |
85-
python -m build -w
88+
if [ -z "${{ matrix.sdist }}" ]; then
89+
wheel_only=-w
90+
fi
91+
python -m build $wheel_only
8692
case "${{ matrix.os }}" in
8793
ubuntu-*)
8894
mkdir old

0 commit comments

Comments
 (0)