-
Notifications
You must be signed in to change notification settings - Fork 11.4k
v2 release pipeline, Phase 2: semver via changesets (TS), GitHub-Release-triggered publishing #4604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
olaservo
wants to merge
7
commits into
main
Choose a base branch
from
release-pipeline-phase-2
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1235bda
chore: reset TypeScript servers to 1.0.0
olaservo bfbe4cc
feat: adopt changesets for the TypeScript workspaces
olaservo 8aed891
feat: publish releases from manually-created GitHub Releases
olaservo bd22331
feat: add prepare-release dispatch for Python CalVer stamping
olaservo 6d193ed
docs: describe the release-triggered publishing flow in RELEASING.md
olaservo 9677b08
fix: keep npm guard payload stderr-free
olaservo de849c4
chore: rename prepare-release.yml to prepare-python-release.yml
olaservo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # Changesets | ||
|
|
||
| The TypeScript packages in this repo are versioned with [changesets](https://github.com/changesets/changesets). If your PR changes a TypeScript server in `src/` in a way users will notice, add a changeset: | ||
|
|
||
| ```bash | ||
| npm run changeset | ||
| ``` | ||
|
|
||
| Pick the affected package(s), choose a bump type, and write a one-line summary — that line becomes the CHANGELOG entry. Commit the generated file in `.changeset/` with your PR. | ||
|
|
||
| Bump types: | ||
|
|
||
| - **patch** — bug fixes | ||
| - **minor** — new tools, prompts, resources, or options | ||
| - **major** — breaking changes (tool removed or renamed, schema change that breaks clients, protocol or Node floor bump) | ||
|
|
||
| Docs-only, CI-only, and Python-only changes don't need a changeset. The Python servers (`fetch`, `git`, `time`) use CalVer and are not managed by changesets — see [RELEASING.md](../RELEASING.md). | ||
|
|
||
| Merged changesets accumulate in a rolling **"Version Packages" PR**; merging that PR applies the version bumps and CHANGELOG updates. Publishing happens when a maintainer creates a GitHub Release. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json", | ||
| "changelog": [ | ||
| "@changesets/changelog-github", | ||
| { "repo": "modelcontextprotocol/servers" } | ||
| ], | ||
| "commit": false, | ||
| "fixed": [], | ||
| "linked": [], | ||
| "access": "public", | ||
| "baseBranch": "main", | ||
| "updateInternalDependencies": "patch", | ||
| "ignore": [] | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| name: Prepare Python Release | ||
|
|
||
| # Stamps today's CalVer date (e.g. 2026.8.1) onto Python packages that changed | ||
| # since their last version bump, and opens a normal PR with the result. The | ||
| # TypeScript packages are versioned by changesets (see version-packages.yml). | ||
| # Publishing happens separately, when a maintainer creates a GitHub Release. | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| prepare: | ||
| if: github.repository_owner == 'modelcontextprotocol' | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Install uv | ||
| uses: astral-sh/setup-uv@v7 | ||
|
|
||
| - name: Stamp CalVer versions | ||
| run: uv run --script scripts/prepare_python_release.py --directory src > stamped.txt | ||
|
|
||
| - name: Check for changes | ||
| id: changes | ||
| run: | | ||
| if git diff --quiet; then | ||
| echo "No Python packages need a version stamp" | ||
| echo "changed=false" >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo "changed=true" >> "$GITHUB_OUTPUT" | ||
| fi | ||
|
|
||
| - name: Create pull request | ||
| if: steps.changes.outputs.changed == 'true' | ||
| env: | ||
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| run: | | ||
| DATE=$(date +%Y.%-m.%-d) | ||
| BRANCH="release/python-$DATE" | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
| git checkout -b "$BRANCH" | ||
| git add -u | ||
| git commit -m "chore: stamp Python CalVer versions for $DATE" | ||
| git push --force origin "$BRANCH" | ||
| { | ||
| echo "Stamps today's CalVer date onto the Python packages that changed since their last version bump:" | ||
| echo | ||
| sed 's/^/- /' stamped.txt | ||
| echo | ||
| echo "Generated by the **Prepare Python Release** workflow. After merging, create a GitHub Release to publish." | ||
| echo | ||
| echo "> [!NOTE]" | ||
| echo "> PRs opened with the workflow token don't trigger CI — close and reopen this PR to run it." | ||
| } > pr-body.md | ||
| if gh pr list --head "$BRANCH" --state open --json number --jq length | grep -qv '^0$'; then | ||
| echo "PR for $BRANCH already open — branch updated" | ||
| else | ||
| gh pr create \ | ||
| --head "$BRANCH" \ | ||
| --title "chore: stamp Python CalVer versions for $DATE" \ | ||
| --body-file pr-body.md | ||
| fi | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is prepare-release.yml the best name for this, since it specifically is for python files? maybe prepare-python-release.yml
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed — renamed to
prepare-python-release.yml(matching its display name andscripts/prepare_python_release.py), RELEASING.md links updated. Unlikerelease.yml, nothing binds to this filename, so the rename is free.🦉 — Claude, via Claude Code