From cc285ede8f357ef2f3168d38ce6bf617ec2fa75b Mon Sep 17 00:00:00 2001 From: abrichr Date: Wed, 19 Aug 2026 18:07:30 -0400 Subject: [PATCH] fix(ci): publish with an action that accepts Metadata-Version 2.5 pypa/gh-action-pypi-publish v1.14.0 bundles twine 6.1.0 and packaging 25.0, which reject Metadata-Version 2.5 -- the version current hatchling emits. The publish step fails with: InvalidDistribution: Invalid distribution metadata: '2.5' is not a valid metadata version This repo builds with unpinned hatchling via the semantic-release build_command, so it emits 2.5 and is exposed to exactly this failure. This is not hypothetical: the same pin broke the openadapt-evals 0.91.0 release. The tag, the version-bump commit and the GitHub release all landed, then "Publish to PyPI" failed, leaving PyPI stale while every other release artifact said the version had shipped. Move to v1.14.2 (twine 7.0.0 + packaging 26.2), the pin openadapt-flow and openadapt-capture already use and the one applied to openadapt-evals in OpenAdaptAI/openadapt-evals#291. Co-Authored-By: Claude Opus 5 --- .github/workflows/publish.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 005ca88..c29df0b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -39,9 +39,15 @@ jobs: if: steps.check_skip.outputs.skip != 'true' && steps.release.outputs.released == 'true' run: python scripts/check_source_boundary.py --require-dist + # v1.14.0 bundles twine 6.1.0 and packaging 25.0, which reject the + # Metadata-Version 2.5 that current hatchling emits. That pin failed the + # openadapt-evals 0.91.0 publish after the tag, the release commit and + # the GitHub release had already landed, leaving PyPI stale. v1.14.2 + # bundles twine 7.0.0 and packaging 26.2, and is the same pin + # openadapt-flow and openadapt-capture use. - name: Publish to PyPI if: steps.check_skip.outputs.skip != 'true' && steps.release.outputs.released == 'true' - uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # release/v1 + uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2 - name: Publish to GitHub Releases if: steps.check_skip.outputs.skip != 'true' && steps.release.outputs.released == 'true'