Add tag-triggered release pipeline (release.yml + publish.yml) - #248
Merged
Conversation
Mirrors the pattern used in chuk-artifacts: pushing a v*.*.* tag runs release.yml, which verifies the tag matches pyproject.toml's version, generates a changelog from git log since the previous tag, and creates a GitHub Release. Publishing that release triggers publish.yml, which gates on the full ci.yml test suite (now reusable via workflow_call), builds the package with `uv build`, and publishes to PyPI using trusted publishing (OIDC) rather than a stored API token. Trusted publishing requires a one-time setup step on pypi.org: under the mcp-cli project's Publishing settings, add IBM/mcp-cli as a trusted publisher for the publish.yml workflow, environment "pypi". Until that's configured, the publish job will fail at the PyPI upload step (the build and test stages will still succeed). Signed-off-by: chris hay <chris.hay@uk.ibm.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
Adds an automated release pipeline, modeled on the one in chuk-artifacts:
v*.*.*tag (or manualworkflow_dispatchwith a tag input). Verifies the tag matchespyproject.toml's version, generates a changelog fromgit logsince the previous tag, and creates a GitHub Release.workflow_call), builds the package withuv build, and publishes to PyPI using trusted publishing (OIDC) — no stored API token.workflow_call:as a trigger so publish.yml can reuse the exact same test suite as a gate instead of duplicating test logic.Required one-time setup
Trusted publishing needs to be configured on PyPI before the first tagged release: on the
mcp-cliproject's Publishing settings page, addIBM/mcp-clias a trusted publisher for workflowpublish.yml, environmentpypi. Until that's done,build/testwill still succeed but the final PyPI upload step will fail.Release flow going forward
versioninpyproject.toml, commit to main.git tag vX.Y.Z && git push origin vX.Y.ZTest plan