Skip to content

Commit

Permalink
workflows: generate sdist tarball in CI
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
bgilbert committed Nov 1, 2023
1 parent 4b05970 commit 78a7107
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
- [ ] `git clean -dxf && mkdir dist`
- [ ] Find the [workflow run](https://github.com/openslide/openslide-python/actions) for the tag; download its docs and wheels artifacts
- [ ] `unzip /path/to/downloaded/openslide-python-wheels.zip && mv openslide-python-wheels-*/* dist/`
- [ ] `python setup.py sdist`
- [ ] `twine upload dist/*`
- [ ] Recompress tarball with `xz`
- [ ] Attach release notes to [GitHub release](https://github.com/openslide/openslide-python/releases/new); upload tarballs and wheels
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ jobs:
# last upstream patch releases that ship with installers.
# https://github.com/actions/setup-python/issues/439#issuecomment-1247646682
include:
- os: ubuntu-latest
python-version: "3.12"
sdist: sdist
- os: macos-latest
python-version: "3.9"
upstream-python: 3.9.13
Expand Down Expand Up @@ -82,7 +85,10 @@ jobs:
esac
- name: Build wheel
run: |
python -m build -w
if [ -z "${{ matrix.sdist }}" ]; then
wheel_only=-w
fi
python -m build $wheel_only
case "${{ matrix.os }}" in
ubuntu-*)
mkdir old
Expand Down

0 comments on commit 78a7107

Please sign in to comment.