Skip to content

Fix PyPI publish for metadata 2.5 and allow retrying a release - #22

Merged
fkilfoyleld merged 1 commit into
masterfrom
fix/release-publish-metadata-2.5
Oct 12, 2026
Merged

fkilfoyleld merged 1 commit into
masterfrom
fix/release-publish-metadata-2.5

Conversation

@fkilfoyleld

@fkilfoyleld fkilfoyleld commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The 2.0.0 release run failed at "Publish package" (nothing was uploaded, no GitHub release created):

InvalidDistribution: Invalid distribution metadata: '2.5' is not a valid metadata version

Current hatchling writes Metadata-Version: 2.5. pypa/gh-action-pypi-publish v1.14.0 bundles twine 6.1, which doesn't accept it.

Change

  • Bump pypa/gh-action-pypi-publish to v1.14.2 (twine 7.0.0), pinned to SHA (same as labd/ecs-deplojo).
  • Add workflow_dispatch to the release workflow so a failed release can be retried. A re-run would use the old workflow, and a new commit doesn't touch CHANGELOG.md. Manual runs skip the version-changed check; the existing-release check still prevents publishing the same version twice.

Checks

  • Local: uv build → twine check with twine 7.0.0 passes for the 2.0.0 wheel and sdist.
  • actionlint, pinact run --check --verify-comment, zizmor (only the trusted-publishing note).

After merge: run "Release" manually on master to publish 2.0.0.

- Bump pypa/gh-action-pypi-publish v1.14.0 -> v1.14.2. Its twine 6.1
  rejected the Metadata-Version 2.5 that current hatchling writes, which
  failed the 2.0.0 publish. v1.14.2 ships twine 7.
- Add workflow_dispatch so a failed release can be retried; manual runs
  skip the version-changed check and rely on the existing-release check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fkilfoyleld
fkilfoyleld merged commit a820d94 into master Oct 12, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant