fix(release): build and publish the sdist, harden publish workflow#71
Merged
Conversation
Releases 0.4.0 and 0.4.1 shipped to PyPI with no source distribution because scripts/build.sh only ran 'python3 -m build . --wheel'. Build the sdist too, and apply release-workflow hardening: - name the build artifact explicitly and fail if dist/ is empty - skip-existing on PyPI publish so re-runs are idempotent - workflow_dispatch trigger so a run from a tag can backfill files missing from an already-published version Assisted-by: Claude Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HgnKFtXZbCjXNoVNWa5JLd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Releases 0.4.0 and 0.4.1 shipped to PyPI with no source distribution — only the universal wheel (verify:
https://pypi.org/pypi/mode-streaming/0.4.1/jsonlists a singlebdist_wheel). The cause isscripts/build.shrunningpython3 -m build . --wheel, which never builds an sdist.Changes:
scripts/build.sh: drop--wheelsopython -m buildproduces both the sdist and the wheel. Verified locally: both artifacts build and passtwine check..github/workflows/publish.ymlhardening:dist-packages) on upload/download instead of the implicit defaultif-no-files-found: errorso an emptydist/fails the build instead of silently publishing nothingskip-existing: trueon the PyPI publish step so re-runs are idempotentworkflow_dispatchtrigger (publish gate widened accordingly) so the workflow can be run manually from a tag to backfill files missing from an already-published versionAfter this merges, running the workflow manually from tags
0.4.0/0.4.1will backfill their missing sdists (skip-existingkeeps the wheels already on the index), and future releases ship complete from the start.🤖 Generated with Claude Code
https://claude.ai/code/session_01HgnKFtXZbCjXNoVNWa5JLd
Generated by Claude Code