Repository navigation
ci: take the template's release, publish and gate fixes - #69
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.
The library was rendered from python-library-template before the template's last round of release fixes, so this brings them over by hand. The workflow text is the template's render at
d9d0a6fwith the names changed; nothing library-specific had to be kept around it, since this repo's publish and release workflows were the stock ones.Publish (template#18, template#24).
checknow decides what gets published: the tag input only reaches the shell throughenv:, has to match a release tag of this project and point at a commit onmaster, and the version in the tag has to equal__version__insqlalchemy_foundation_kit/__version__.pyat that commit. The "Set version from release tag" step is gone, so a tag that disagrees with the committed version fails instead of shipping under the tag's version.checkalso waits for thepushCI run on the released SHA and fails unless it succeeded, so a release is never uploaded before CI has finished on that commit.publishchecks out the SHA thatcheckresolved,id-token: writemoved from the workflow to thepublishjob, and distributions are signed withpypi-attestationsbeforeuv publish, so releases carry PEP 740 provenance.Gate (template#19). "All checks passed" used to fail only on
failureorcancelled, so a skipped job counted as green. Now every needed job has to endsuccess.MAY_SKIPis[]: none oflint,test-unit,test-integrationhas anif:, so none of them is skipped by design.Release Please (template#23). The release PR is opened with a token of the org's release App when
RELEASE_PLEASE_APP_CLIENT_IDis set, so its CI starts without a close and reopen. Until then it falls back toGITHUB_TOKENand the run carries a warning, which is today's behaviour..copier-answers.yml(template#21). Written by hand socopier updatecan reach this repo from now on, with_commit: d9d0a6fsince the workflows now match that commit. I produced it withcopier copy --vcs-ref d9d0a6fand this library's answers, then set_src_pathtogh:bedrock-python/python-library-template, so the formatting is exactly what Copier writes (the description wraps the way Copier wraps it).Local evidence
actionlint1.7.12 with shellcheck on all four workflows: clean, apart from the two known findings aboutclient-idonactions/create-github-app-token@v3(its bundled metadata predates the input;v3declaresclient-idand deprecatesapp-id).The "Resolve the release tag" step, taken from this
publish.ymland run with bash-eo pipefailin a throwaway repo with a bareorigin, one commit with__version__ = "1.2.3"tagged twice:Not ported
--all-extrason thelintjob'suv sync(template commit 4c9f596): the template type-checks with every extra installed, this repo without them. It changes what mypy sees, so it deserves its own change rather than riding along here.NEW_LIBRARY_CHECKLIST.md): they apply to new renders, not to an existing library.The
pypienvironment's master-only deployment policy from template#18 is a repository setting; it comes from re-runningsetup_repo.py, not from this diff.