Skip to content

ci: keep cosign bundles outside dist/ so PyPI publish does not reject them#60

Merged
killertcell428 merged 3 commits into
masterfrom
ci/fix-cosign-bundle-path
May 17, 2026
Merged

ci: keep cosign bundles outside dist/ so PyPI publish does not reject them#60
killertcell428 merged 3 commits into
masterfrom
ci/fix-cosign-bundle-path

Conversation

@killertcell428
Copy link
Copy Markdown
Owner

Summary

After #59 made cosign output a .cosign.bundle per artifact, the v1.1.4 release run failed at PyPI publish:

```
Checking dist/pyaigis-1.1.4-py3-none-any.whl.cosign.bundle:
ERROR InvalidDistribution: Unknown distribution format
```

pypa/gh-action-pypi-publish verifies every file in dist/ against PyPI's accepted distribution formats and rejects anything else. The cosign bundle is not a PEP 740 attestation, so it can't live in dist/.

Changes

  • Sign step writes bundles to a separate dist-signatures/ directory
  • Add a second upload-artifact for python-package-signatures
  • Release job downloads both artifacts into release-files/ and attaches everything to the GitHub Release together

PyPI publish keeps reading from dist/ unchanged — it now only sees wheels and sdists, as it expects.

Test plan

  • Required CI checks pass
  • After merge, re-tag v1.1.4 against master HEAD and confirm the full Release pipeline succeeds (Build → Publish → GitHub Release)

🤖 Generated with Claude Code

…ut-signature/--output-certificate)

The Release workflow's "Sign distributions with cosign" step was failing
the v1.1.4 release run with:

  Flag --output-signature has been deprecated, please use --bundle
  Flag --output-certificate has been deprecated, please use --bundle
  Error: signing dist/pyaigis-1.1.4-py3-none-any.whl:
         create bundle file: open : no such file or directory

cosign v3 removed the two legacy output flags and now requires a single
--bundle <path> that contains both the signature and the Sigstore
certificate. Replace the two-file flow with a per-artifact .cosign.bundle.

The bundle file is uploaded to the GitHub Release artifacts step
(softprops/action-gh-release with `files: dist/*`) so downstream verifiers
can still fetch the signature material from the release page; verification
with `cosign verify-blob --bundle ...` is the documented v3 flow.

Signed-off-by: killertcell428 <killertcell428@gmail.com>
… them

The v1.1.4 release run (after the cosign v3 --bundle fix in #59) failed
in the Publish → PyPI step with:

  Checking dist/pyaigis-1.1.4-py3-none-any.whl: PASSED
  Checking dist/pyaigis-1.1.4-py3-none-any.whl.cosign.bundle:
    ERROR  InvalidDistribution: Unknown distribution format:
           'pyaigis-1.1.4-py3-none-any.whl.cosign.bundle'

pypa/gh-action-pypi-publish runs metadata verification across every file
in dist/ and rejects extensions it does not recognise. The cosign bundle
is not a PEP 740 attestation and does not belong in dist/.

Changes:
- Sign step writes bundles to dist-signatures/ (separate dir) instead of
  next to the wheel/sdist.
- Add a second upload-artifact for python-package-signatures so the
  bundles survive to the GitHub Release job.
- Release job downloads BOTH artifacts into a release-files/ directory
  and uploads everything together to the GitHub Release.

PyPI publish keeps reading from dist/ unchanged, so the verification
step now sees only wheels and sdists.

Signed-off-by: killertcell428 <killertcell428@gmail.com>
@killertcell428 killertcell428 merged commit dca7f70 into master May 17, 2026
11 checks passed
@killertcell428 killertcell428 deleted the ci/fix-cosign-bundle-path branch May 17, 2026 18:46
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