ci: split the release into read and write jobs, pin every action, widen the matrix - #91
Merged
Merged
Conversation
…en the matrix The release ran all of its steps, the project's and its dependencies' code included, with a write token, expanded the dispatch tag straight into shell, and keyed its concurrency on the ref, so a tag push and a manual run raced. A resolve job now validates the tag against vX.Y.Z and passes it through the environment, the build can only read, and a publish job that checks out nothing attests the wheel and sdist and attaches them. Runs queue per tag. Every action is pinned to a commit with its version beside it, Dependabot keeps those pins and uv.lock current after a week's cooldown, and the test matrix adds macOS and Python 3.14. Fixes #52. Part of #51. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
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.
Fixes #52. Part of #51 (see the last section).
Release workflow (#51)
permissions: {}, so each job gets only what it asks for:resolvegets no permissions.buildhascontents: read, and it runsuv sync, the gate, anduv build.publishgetscontents: write,id-token: writeandattestations: write. It checks out nothing and runs no project code. It downloads thedistartifact, attests it, and attaches it.resolvereads the tag fromenv:and checks it against^v[0-9]+\.[0-9]+\.[0-9]+$before any other job runs. The later jobs read it only from the environment, and the checkout usesrefs/tags/<tag>.release-${{ inputs.tag || github.ref_name }}. A tag push and a manual dispatch for the same tag now share a group and queue, where before they raced to--clobberthe same assets.actions/attest-build-provenancesigns the wheel and the sdist, so anyone can rungh attestation verify <file> -R TMHSDigital/plumblineto check where they came from.persist-credentials: false, and the build turns off the uv cache so a release never builds from a cache another workflow wrote.Pins, Dependabot, matrix (#52)
uses:in the three workflows now points at a commit SHA, with the version in a comment. Each pin is the newest release within the major version already in use (checkout v5.1.0, setup-uv v7.6.0, and so on). Newer majors exist, and Dependabot proposes them as their own PRs instead of this one bundling them..github/dependabot.ymlcoversgithub-actionsanduv, weekly, grouped into one PR per ecosystem, with a 7-day cooldown. For uv it useslockfile-only, since the floors in pyproject are raised by hand and tested by the lowest-direct job.What is left of #51
The published v0.1.0 release still has no assets. The tag's
__version__is0.1.0, so once this lands a dispatch of the new workflow withtag: v0.1.0would build, attest and attach them. That publishes to a public release, so it waits for the maintainer to confirm. The Unreleased section that #51 asks for already exists in CHANGELOG.actionlintpasses on all three workflows.🤖 Generated with Claude Code