Repository navigation
ci: take the template's release, publish and gate fixes - #53
Merged
Merged
Conversation
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.
grpc-server-kit was rendered from python-library-template before five of its fixes landed, so this takes them over by hand, in the rendered text with only the names changed.
publish.ymlandrelease-please.ymlare now identical to a render of templated9d0a6ffor this library.Publish (bedrock-python/python-library-template#18). The
checkjob now decides what gets published. The dispatchtaginput is data passed throughenv:: it has to match the release tag pattern, exist, and point at a commit onmaster. Aworkflow_runstart only counts when Release Please ran for apush.checkwaits for thepushCI run on the released SHA and stops unless it passed, and thepublishjob checks out that SHA rather than the tag.id-token: writemoved from the workflow to thepublishjob;checkhascontents: readandactions: read. The step that overwrotegrpc_server_kit/__version__.pyfrom the tag is gone: instead the tag's version has to equal the committed__version__, and a mismatch fails with both values.VERSION_FILEisgrpc_server_kit/__version__.py, the file hatch reads the version from.Attestations (bedrock-python/python-library-template#24).
pypi-attestations signruns beforeuv publish, so releases carry PEP 740 provenance.uv publishalready ran without file arguments, so the attestation files get picked up; the comment explains why it has to stay that way.Gate (bedrock-python/python-library-template#19).
All checks passednow requiressuccessfrom every job it needs. Before, askippedjob counted as passed.needsis unchanged (lint,test-unit,test-integration).MAY_SKIPis[]: none of those jobs has anif:, so none is skipped by design.Release Please (bedrock-python/python-library-template#23). Release Please uses a token from the org's release App when
RELEASE_PLEASE_APP_CLIENT_IDis set, so the release PR gets CI without a close and reopen. Until the App exists it falls back toGITHUB_TOKENand the run says so in a warning.Answers file (bedrock-python/python-library-template#21).
.copier-answers.ymlat_commit: d9d0a6f, socopier updatecan reach this repo. I produced it withcopier copy --vcs-ref d9d0a6f gh:bedrock-python/python-library-templateusing this library's answers and took the file as Copier wrote it, including the line wrap of the description.Local evidence
actionlint1.7.12 with shellcheck 0.11 on all four workflows: clean, apart from the two known false positives aboutclient-idoncreate-github-app-token@v3(actionlint's bundled metadata predates that input).The "Resolve the release tag" step, extracted from this branch's
publish.ymlwith its env and run withbash -eo pipefailin a throwaway repo with a bareorigin. The repo has master's realgrpc_server_kit/__version__.py(0.2.1),grpc-server-kit-v0.2.1on that commit, andgrpc-server-kit-v9.9.9on the next one:Not ported
NEW_LIBRARY_CHECKLIST.md) are about new renders and do not apply to an existing library.ci.ymldifferences from a fresh render are grpc-server-kit's own and stay as they are: the Python matrix, newer action versions, and integration tests without the exit-code-5 allowance.docs.ymlmatches the render exactly.The
master-only deployment policy on thepypienvironment comes fromsetup_repo.py, not from this file, and this repo does not have it yet (deployment_branch_policyisnull). Untilsetup_repo.pyis re-run here, a dispatch from another branch can still reach the environment, so its own copy ofpublish.ymlwould be the one deciding.