Repository navigation
ci: take the template's release, publish and gate fixes - #58
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
alembic-gauntlet was rendered from python-library-template before five of its fixes landed, so this brings them over by hand. The workflow text is the template's render at
d9d0a6fwith only the names changed.Publish (bedrock-python/python-library-template#18). The
checkjob now decides what gets published. The dispatchtaginput reaches the shell only throughenv:, has to match a release tag of this project, and has to point at a commit onmaster. The job then waits for thepushCI run on that commit and fails unless it passed. The tag's version has to equal__version__inalembic_gauntlet/__version__.pyat that commit. The "Set version from release tag" rewrite is gone, so a tag that disagrees with the committed version stops the release. Before, it was shipped under the tag's version.publishchecks out the SHA thatcheckresolved, not the tag.id-token: writemoved from the workflow to thepublishjob. The version file keeps its# x-release-please-versioncomment; the check'ssedreads the version in front of it (see below).Attestations (bedrock-python/python-library-template#24).
pypi-attestations signruns beforeuv publish, so releases get PEP 740 provenance.uv publishis still called without file arguments, which is what makes it pick up the.attestationfiles.Gate (bedrock-python/python-library-template#19).
All checks passednow fails whenlint,test-unitortest-integrationendsskipped, not only onfailure/cancelled.MAY_SKIPis[]: none of the three has a job-levelif:, so none is skipped by design.Release Please (bedrock-python/python-library-template#23). It uses a token of the org's release App when
RELEASE_PLEASE_APP_CLIENT_IDis set, so CI runs on the release PR without a close and reopen. Until then it falls back toGITHUB_TOKENwith a warning, i.e. it behaves as it does today..copier-answers.yml(bedrock-python/python-library-template#21). Written by hand in the render's format, with_commit: d9d0a6f, socopier updatecan run from here on.Local evidence
actionlint1.7.12 with shellcheck on all four workflows reports only the two knownclient-id/app-idfindings oncreate-github-app-token@v3. Those come from its outdated bundled action metadata;v3declaresclient-id.The "Resolve the release tag" step, taken from this branch's
publish.ymland run withbash -eo pipefailin a throwaway repo with a bareorigin. The commit carries this repo's real__version__.py(__version__ = "0.3.1" # x-release-please-version):Not ported
NEW_LIBRARY_CHECKLIST.md) do not apply to an existing library.uv syncwithout--all-extras, Python 3.10-3.14 in the matrix, unit tests without coverage and thetest-integrationjob running both suites with--cov-fail-under=63(asmake testdoes),codecov-action@v7, and the dispatch input's example tag (v0.2.0). The old comment oncheck'sif:is replaced by the render's header comment, which also covers the newevent == 'push'condition.After merging, re-run
setup_repo.pyon this repo. Thepypienvironment has no deployment policy today, and the master-only policy it sets is the boundary #18 actually relies on; the YAML check alone does not protect anything.