Repository navigation
Add tag-triggered release pipeline - #2
Merged
Merged
Conversation
Publishing was entirely manual: ci.yml only ran tests. Add release.yml,
which on a v* tag verifies versions, runs the full matrix, builds, publishes
to PyPI via Trusted Publishing, and cuts the GitHub release.
Trusted Publishing uses an OIDC exchange rather than an API token, so no
long-lived credential lives in repo secrets or on a maintainer's machine.
The pypi environment gives a manual approval gate before upload.
Four guards run before anything is uploaded, because a version burned on
PyPI can never be reused:
- the tag, pyproject.toml and both server.json versions must agree
- the version must not already exist on PyPI
- the full 3.10-3.13 test matrix must pass
- the built wheel must contain lablink/demo/ and the lablink-sim entry
point, both of which depend on packaging config and fail silently
Also adds docs/RELEASING.md covering the one-time PyPI configuration and
the per-release steps.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Summary
Publishing was entirely manual —
ci.ymlonly ran tests. This addsrelease.yml, triggered by av*tag:Uses PyPI Trusted Publishing (OIDC), so no long-lived API token is stored in repo secrets or on a maintainer's machine. The
pypienvironment provides a manual approval gate before upload.Guards before upload
A version burned on PyPI can never be reused, so the pipeline refuses to publish unless:
pyproject.tomlvs bothserver.jsonversionstwine checklablink/demo/or thelablink-simentry point — both packaging-config dependent, both fail silentlyThe version guard is worth calling out: this repo carries the version in three places, which is exactly the footgun that produces a bad release.
Dry run
Run manually from the Actions tab with publish unchecked — builds and verifies, uploads nothing.
Validated locally
v0.2.0, correctly rejects a mismatchedv0.9.90.1.0(already published) and allows0.2.0Requires one-time setup before first use
PyPI-side Trusted Publisher configuration (owner
techmanual-ai, repolablink-mcp, workflowrelease.yml, environmentpypi) plus apypiGitHub environment. Documented indocs/RELEASING.md.🤖 Generated with Claude Code