fix(ci): keep dist/ clean so PyPI publish doesn't choke on tool-hashes.json#13
Merged
Conversation
…s.json The SEC-022 snapshot wrote tool-hashes.json into dist/, and the publish job runs twine over every file in the downloaded dist/ artifact -> it rejected the hash file with 'InvalidDistribution: Unknown distribution format'. Write the snapshot to a separate tool-hashes/ dir and upload it as its own artifact, so the dist/ artifact consumed by pypa/gh-action-pypi-publish contains only the wheel and sdist. https://claude.ai/code/session_01CokY47qCb5iHuAfAEWdCvU
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.
Problem
The v0.2.0 release's Publish to PyPI step failed:
The SEC-022 snapshot step wrote
tool-hashes.jsonintodist/, andpypa/gh-action-pypi-publishrunstwineover every file in the downloadeddist/artifact — it rejects the non-distribution file. The wheel + sdist both passed; the failure happened during the metadata check, before any upload, so nothing reached PyPI and0.2.0is still free.Fix
Write the hash snapshot to a separate
tool-hashes/dir and upload it as its own artifact, so thedist/artifact consumed by the publish job contains only the wheel and sdist. SEC-022 hashes are still produced and retained as a workflow artifact.Verified
publish.ymlis valid YAMLsnapshot_tool_hashes.py <path>writes correctly to a path outsidedist/(6 tools)After merge — how to recover the release
Because
release: publishedruns the workflow from the tagged commit, just re-running the old run won't pick up this fix. Cleanest recovery (nothing is on PyPI yet):v0.2.0targeting the updatedmain(now includes this fix) → publishing runs the corrected workflow → PyPI upload succeeds.https://claude.ai/code/session_01CokY47qCb5iHuAfAEWdCvU
Generated by Claude Code