Skip to content

Conversation

@pcarleton
Copy link
Member

Summary

Adds a workflow that automatically publishes v1.x releases when a v1.* tag is pushed. This mirrors the structure of the existing main.yml workflow.

The Problem

Currently, releasing from the v1.x branch requires switching GitHub's default branch from main to v1.x to create a release targeting that branch.

The Solution

A new workflow that triggers on v1.* tag pushes:

on:
    push:
        tags:
            - 'v1.*'

Usage

git checkout v1.x
npm version patch  # bumps version and creates tag (e.g., v1.25.3)
git push origin v1.x --tags

The workflow will automatically:

  1. Build and run npm run check
  2. Test on Node 18 and 24
  3. Publish to npm with release-X.Y tag (e.g., release-1.25)

npm Tags

v1.x releases use release-X.Y tags instead of latest, allowing users to install specific minor versions:

npm install @modelcontextprotocol/sdk@release-1.25

To update latest to point to a v1.x release, run manually:

npm dist-tag add @modelcontextprotocol/sdk@1.25.2 latest

This workflow allows releasing v1.x versions without having to switch GitHub's
default branch from main to v1.x. Previously, creating a GitHub release targeting
the v1.x branch required temporarily changing the repo's default branch.

Usage:
1. Ensure the version is bumped and tagged on v1.x branch
2. Go to Actions > 'Release v1.x' > Run workflow
3. Enter the version number (e.g., 1.25.2)
4. Select the npm tag (latest, release-1.25, etc.)

The workflow will:
- Validate the version format
- Run tests on v1.x branch
- Verify the tag exists
- Create a GitHub Release (not marked as latest)
- Publish to npm with the selected tag
Simpler approach that mirrors the existing main.yml workflow pattern:
- Triggers automatically when a v1.* tag is pushed
- Runs same build/test matrix as main workflow
- Publishes with release-X.Y npm tag (e.g., release-1.25)

Usage:
  git checkout v1.x
  npm version patch  # bumps version and creates tag
  git push origin v1.x --tags
@pcarleton pcarleton requested a review from a team as a code owner January 7, 2026 16:15
@changeset-bot
Copy link

changeset-bot bot commented Jan 7, 2026

⚠️ No Changeset found

Latest commit: d68cb4b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new
Copy link

pkg-pr-new bot commented Jan 7, 2026

Open in StackBlitz

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/client@1367
npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/server@1367

commit: d68cb4b

@pcarleton pcarleton enabled auto-merge (squash) January 9, 2026 19:45
@pcarleton pcarleton merged commit 2bb7f47 into main Jan 9, 2026
12 checks passed
@pcarleton pcarleton deleted the feat/v1x-release-workflow branch January 9, 2026 19:46
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.

3 participants