From cd411a2d2f7171478d27a3f714b3b6e118969114 Mon Sep 17 00:00:00 2001 From: Daniel Stoops Date: Sun, 16 Aug 2026 13:17:14 +0300 Subject: [PATCH 1/2] fix: download sdist artifact by name so it uploads to PyPI download-artifact@v4's pattern globs artifact names, not paths within an artifact, so sdist/*.tar.gz matched nothing and the release silently published wheels only. Affects both the PyPI and TestPyPI workflows. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/publish-to-pypi.yml | 2 +- .github/workflows/publish-to-test-pypi.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 35103bc..6d6bd68 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -68,7 +68,7 @@ jobs: - uses: actions/download-artifact@v4 with: - pattern: sdist/*.tar.gz + name: sdist path: dist - uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.github/workflows/publish-to-test-pypi.yml b/.github/workflows/publish-to-test-pypi.yml index b937517..6cf2ab3 100644 --- a/.github/workflows/publish-to-test-pypi.yml +++ b/.github/workflows/publish-to-test-pypi.yml @@ -64,7 +64,7 @@ jobs: - uses: actions/download-artifact@v4 with: - pattern: sdist/*.tar.gz + name: sdist path: dist - uses: pypa/gh-action-pypi-publish@release/v1 From dd166579cdc61894a3095e3c3a8c0a258a6ca09d Mon Sep 17 00:00:00 2001 From: Daniel Stoops Date: Sun, 16 Aug 2026 13:20:59 +0300 Subject: [PATCH 2/2] fix: publish sdist to PyPI and modernise sdist build download-artifact@v4's pattern globs artifact names, not paths within an artifact, so sdist/*.tar.gz matched nothing and releases silently published wheels only. Switch to ame: sdist. Also replace the deprecated setup.py sdist with python -m build --sdist, which sources build deps from build-system.requires rather than an unpinned manual pip install list. Applies to both the PyPI and TestPyPI workflows. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/publish-to-pypi.yml | 11 ++++------- .github/workflows/publish-to-test-pypi.yml | 11 ++++------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index 6d6bd68..5dd1a45 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -14,19 +14,16 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: 3.12 + python-version: '3.12' - name: Build a source tarball run: | - python -m pip install --upgrade pip - python3 -m pip install numpy - python3 -m pip install setuptools - python3 -m pip install setuptools-scm - python3 setup.py sdist + python -m pip install --upgrade build + python -m build --sdist - name: Store the distribution packages uses: actions/upload-artifact@v4 with: name: sdist - path: dist/ + path: dist/*.tar.gz build_wheels: name: Build wheels on ${{matrix.os}} 🎡 diff --git a/.github/workflows/publish-to-test-pypi.yml b/.github/workflows/publish-to-test-pypi.yml index 6cf2ab3..e68fa46 100644 --- a/.github/workflows/publish-to-test-pypi.yml +++ b/.github/workflows/publish-to-test-pypi.yml @@ -12,19 +12,16 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: 3.12 + python-version: '3.12' - name: Build a source tarball run: | - python -m pip install --upgrade pip - python3 -m pip install numpy - python3 -m pip install setuptools - python3 -m pip install setuptools-scm - python3 setup.py sdist + python -m pip install --upgrade build + python -m build --sdist - name: Store the distribution packages uses: actions/upload-artifact@v4 with: name: sdist - path: dist/ + path: dist/*.tar.gz build_wheels: name: Build wheels on ${{matrix.os}} 🎡