Repository navigation
ci(release-package): tag and publish an immutable GitHub Release after PyPI - #1208
Merged
Merged
Conversation
…r PyPI Each package release is tagged <pypi-project>-v<version>; v* stays the launcher's. Before the upload, preflight-github runs as the openadapt-release App and requires immutable releases plus active creation, update and deletion rules for that exact package tag. The build also requires the package CHANGELOG to open with the version and the tag not to exist. After PyPI accepts the files, publish-github creates the annotated tag at the published commit as the App, then a draft release with the same sdist and wheel and the CHANGELOG notes. It verifies the draft, publishes it, and verifies the immutable release and its attestation. verify_release_hosting accepts only the three package tag prefixes besides v.
…g-and-github-release
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.
A package release from
packages/currently publishes only to PyPI. It leaves no tag, no GitHub Release, and nothing the Production release admission can bind to. This PR adds those steps.Tags
<pypi-project>-v<version>, for exampleopenadapt-flow-v2.2.0.v*stays reserved for the launcher, so a package tag never triggersrelease-and-publish.yml.Rulesets (already created on this repository; the existing
v*rulesets are untouched)Build job now also refuses to continue when:
packages/<pkg>/CHANGELOG.mddoes not open with## v<version> (date);preflight-github (new; runs before the PyPI upload)
release-identityas the openadapt-release App, with the App slug checked.verify_release_hosting.pyfor the exact package tag, so the upload can't start without immutable releases and closed tag rules.publish-github (new; needs
publish, so it runs only after PyPI accepts the files)--verify-tagand--latest=false, carrying the same sdist and wheel and the CHANGELOG notes.verify_release_hosting.pyv<X.Y.Z>or one of the exact prefixesopenadapt-agent-,openadapt-flow-andopenadapt-types-.v*rules don't cover it; any other prefix is refused.The matching policy change in OpenAdaptAI/.github (flow and agent bound to this repository and these tags) is OpenAdaptAI/.github#54.
Checks run:
pytest tests/test_release_hosting.py(15 passed) and actionlint on the workflow.