Skip to content

Add tag-triggered release pipeline - #2

Merged
techmanual-ai merged 1 commit into
mainfrom
ci/release-workflow
Sep 17, 2026
Merged

techmanual-ai merged 1 commit into
mainfrom
ci/release-workflow

Conversation

@techmanual-ai

Copy link
Copy Markdown
Owner

Summary

Publishing was entirely manual — ci.yml only ran tests. This adds release.yml, triggered by a v* tag:

check-version → test (3.10–3.13) → build → publish-pypi → github-release

Uses PyPI Trusted Publishing (OIDC), so no long-lived API token is stored in repo secrets or on a maintainer's machine. The pypi environment 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:

Guard Catches
Tag vs pyproject.toml vs both server.json versions A wheel whose version disagrees with the registry manifest
PyPI existence check A duplicate upload that would fail anyway
Full 3.10–3.13 matrix Code that breaks on a supported Python
twine check Malformed metadata
Wheel contents check Shipping without lablink/demo/ or the lablink-sim entry point — both packaging-config dependent, both fail silently

The 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

  • YAML parses; all five jobs resolve
  • Version check passes on matching v0.2.0, correctly rejects a mismatched v0.9.9
  • PyPI guard correctly blocks 0.1.0 (already published) and allows 0.2.0
  • Changelog extraction pulls the right 51-line section for the release notes

Requires one-time setup before first use

PyPI-side Trusted Publisher configuration (owner techmanual-ai, repo lablink-mcp, workflow release.yml, environment pypi) plus a pypi GitHub environment. Documented in docs/RELEASING.md.

🤖 Generated with Claude Code

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>
@techmanual-ai
techmanual-ai merged commit a5b55d7 into main Sep 17, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant