[codex] Add TestPyPI trusted publishing readiness#17
Merged
Conversation
33909ed to
d019345
Compare
d019345 to
7efd8b8
Compare
Owner
Author
|
Self-review note: PR4 scope is limited to TestPyPI / Trusted Publishing readiness. The workflow is manually gated, uses OIDC-compatible permissions, separates build/check from upload, and keeps production PyPI publishing absent. Verified locally with build, twine check, pytest, and git diff --check; GitHub checks are green and the TestPyPI publish job is skipped by default. |
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.
Summary
This PR adds the v0.5 PR4 TestPyPI / Trusted Publishing readiness dry-run path for
tools/sbom-diff-and-risk.It intentionally stops short of production PyPI publishing. The new workflow always performs the no-risk validation path: build the wheel and source distribution, run
twine check, and upload the checked distributions as a GitHub Actions artifact. A TestPyPI upload job exists, but it only runs fromworkflow_dispatchwhen a maintainer explicitly setspublish_to_testpypi=true, and it requires the external TestPyPI pending/trusted publisher configuration to match first.Authentication and publishing model
The TestPyPI upload job uses OIDC / Trusted Publishing through
pypa/gh-action-pypi-publish@release/v1andrepository-url: https://test.pypi.org/legacy/. It does not use or document a long-lived PyPI API token.The workflow identity documented for TestPyPI is:
stacknilscientific-computing-toolkitsbom-diff-and-risk-testpypi.ymltestpypisbom-diff-and-riskBoth PyPI and TestPyPI project JSON endpoints currently return 404 for
sbom-diff-and-risk, so this PR documents that the correct current outcome is Trusted Publishing readiness only unless maintainers complete the external TestPyPI pending publisher setup and run the manual upload after merge.Scope boundaries
This PR does not change CLI analysis behavior, SARIF behavior, policy behavior, release asset publishing, or production PyPI publishing. It preserves the existing GitHub artifact/release provenance docs and only adds the TestPyPI readiness path plus publishing-readiness documentation.
Validation
Local validation performed:
Results:
python -m build: passedpython -m twine check: passed for wheel and sdistpython -m pytest: 145 passedgit diff --check: passedPost-merge validation
Run the new
sbom-diff-and-risk-testpypiworkflow manually withpublish_to_testpypi=falseto validate the safe no-upload path. After TestPyPI has the matching pending publisher and thetestpypiGitHub environment exists, run it again withpublish_to_testpypi=trueto complete the TestPyPI dry-run.