Skip to content

Build release artifacts once, in their own jobs - #156

Open
Jim Garrison (garrison) wants to merge 1 commit into
mainfrom
multistage-release
Open

Jim Garrison (garrison) wants to merge 1 commit into
mainfrom
multistage-release

Conversation

@garrison

Copy link
Copy Markdown
Member

Adopts the multi-stage release.yml already in use by qiskit-addon-utils, qiskit-addon-sqd, qiskit-mitigation and coheriq. The sdist and wheel are each built in their own job and uploaded as artifacts; the github and pypi jobs download those artifacts instead of rebuilding from a fresh checkout. PyPA's guidance is to keep the build job separate from the publishing jobs, which "should only download the already-built artifacts and upload them."

Effects:

  • What is attached to the GitHub release is byte-for-byte what is uploaded to PyPI.
  • The distributions are now attached to the GitHub release, which they were not before.
  • A push to main or stable/** builds both distributions without publishing; both publish jobs are gated on startsWith(github.ref, 'refs/tags/').

This package builds a single universal (py3-none-any) wheel, so build_wheels needs no platform matrix.


This pull request was drafted by Claude Opus 5 under my guidance.

Adopt the multi-stage release workflow already used by
qiskit-addon-utils, qiskit-addon-sqd, qiskit-mitigation and coheriq.
The sdist and wheel are built in dedicated jobs and uploaded as
artifacts; the github and pypi jobs download them rather than
rebuilding.  PyPA's guidance is to keep the build job separate from the
publishing jobs, which should only download already-built artifacts
and upload them.

This also means what is attached to the GitHub release is
byte-for-byte what is uploaded to PyPI, and that a push to main or a
stable branch exercises the build without publishing anything.  The
publish jobs are gated on refs/tags/.

Assisted-by: Claude Opus 5
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 40030604722

Coverage remained the same at 100.0%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 633
Covered Lines: 633
Line Coverage: 100.0%
Coverage Strength: 1.0 hits per line

💛 - Coveralls

@garrison
Jim Garrison (garrison) marked this pull request as ready for review October 24, 2026 00:33

This branch has not been deployed

No deployments
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.

2 participants