Skip to content

Commit 7d8a771

Browse files
authored
ci: exclude attestation sidecars from the PyPI artifact-identity assert (#124)
gh-action-pypi-publish v1.14+ writes <dist>.publish.attestation sidecar files into packages-dir before uploading. The post-publish assert builds its expected set from dist/ contents, and PyPI serves attestations via the integrity API rather than as distribution files, so the sidecars can never appear in the JSON API's urls[] -- the assert now fails on every release even when the publish is complete and attested. Observed on the v0.10.1 run (32177134404): both distributions matched by sha256 and both files have provenance bundles on the integrity API, but the two sidecar names failed the set comparison twice (initial run and skip-existing re-run). Filter *.publish.attestation from the local set; the distribution set-equality check (including the planted-extra-wheel direction) is unchanged. 🤖 Generated with Claude Code Co-Authored-By: [Claude](mailto:noreply@anthropic.com)
1 parent 3b130ee commit 7d8a771

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,16 @@ jobs:
447447
sys.exit(0)
448448
449449
remote = {u["filename"]: (u.get("digests") or {}).get("sha256") for u in payload.get("urls") or []}
450-
local = sorted(p for p in pathlib.Path("dist").iterdir() if p.is_file())
450+
# gh-action-pypi-publish v1.14+ writes `<dist>.publish.attestation`
451+
# sidecars into packages-dir before upload. PyPI serves attestations
452+
# via the integrity API, never as distribution files, so the sidecars
453+
# must not enter the set-equality comparison below -- with them, this
454+
# assert fails on every release even when the publish is complete and
455+
# attested (observed on the v0.10.1 run).
456+
local = sorted(
457+
p for p in pathlib.Path("dist").iterdir()
458+
if p.is_file() and not p.name.endswith(".publish.attestation")
459+
)
451460
if not local:
452461
print("::error::no files in dist/ to compare -- the download-artifact step produced nothing")
453462
sys.exit(1)

0 commit comments

Comments
 (0)