Skip to content

Require Python sdists in release workflows#9018

Open
steadytao wants to merge 1 commit intogoogle:masterfrom
steadytao:fix-8895-require-python-sdist-in-release
Open

Require Python sdists in release workflows#9018
steadytao wants to merge 1 commit intogoogle:masterfrom
steadytao:fix-8895-require-python-sdist-in-release

Conversation

@steadytao
Copy link
Copy Markdown

Summary

Add release guards so Python packaging workflows require both a wheel and a source distribution.

Problem

Issue #8895 reports that the PyPI release for 25.12.19 was uploaded without an sdist.

That is a release-process failure rather than a runtime code bug, and it is useful to prevent directly in CI and release automation.

Fix

  • extend the Python CI job to build the Python package
  • run twine check on the built artifacts
  • assert that both a wheel and an sdist are present
  • add the same checks to the PyPI release workflow before upload

Testing

  • ran python -m build in python/
  • confirmed the build produces both:
    • flatbuffers-25.12.19-py3-none-any.whl
    • flatbuffers-25.12.19.tar.gz
  • verified the new workflow checks match those artifact expectations

Fixes #8895.

Build and validate both wheel and source distribution artifacts in Python CI and before PyPI upload.

Fail the workflow if either artifact is missing so wheel-only Python releases cannot slip through again.

Fixes google#8895
@steadytao steadytao requested a review from dbaileychess as a code owner April 3, 2026 07:06
@github-actions github-actions bot added the CI Continuous Integration label Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI Continuous Integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PyPI release for v25.12.19 is missing a source distribution

1 participant