← 返回列表
全部 Skill›DevOps›release

release

作者 @modelcontextprotocol · 语言 en
Cut a milestone release: the release issue, the preparation PRs on v2/main (audit, changesets Version Packages, Python CalVer), the pure v2/main to main merge PR with its release ledger, then the GitHub Release a maintainer publishes.
DevOpsGit 工作流通用执行命令读写文件待翻译
最近源活动
—
检测 SKILL.md 语言
en
星标 ★
92,114
分支 Fork
0
安装选项
提示
指令
使用 AI 助手安装
将下面的提示复制到你正在使用的 AI 助手中。
下载完整 Skill 目录(含全部配套文件)。 下载压缩包 ↓
SKILL.md 原文预览

Cutting a milestone release

How versions and publishing work, and what to do when a publish fails, is

RELEASING.md. This skill is the procedure for one

milestone, start to finish. It is started by name only (/release), because a

release is never something to begin by inference.

A release is cut from main, after the milestone's work has been merged

there from v2/main. Nothing publishes from v2/main: release.yml refuses a

Release whose commit is not on main.

What stays human. Publishing the GitHub Release and approving the release

environment deployments are a maintainer's acts. So is merging any PR. Prepare,

verify and recommend; do not perform those.

0. Check this session's instructions first

A release is the longest-running session and the costliest to get wrong, and

it follows this skill and AGENTS.md exactly as they were when the session

started. Before step 1, run the staleness check in AGENTS.md

Issue-driven work style (all work in a worktree freshly cut from

origin/v2/main), whatever the SessionStart hook printed: the hook ran when

the session began, and this check runs now.

On STALE, or a STALE line from the SessionStart hook, stop and ask

for a session started in a fresh worktree. The v2.0.0 release ran its first

three steps on a release skill 447 commits out of date (#5167). Re-run the

check after each preparation PR merges, since v2/main moves under the

session, from the session-start revision, not HEAD: this flow moves

between worktrees (step 4e moves the verification worktree onto a newer

candidate), and a newer worktree's HEAD says nothing about the rules this

session loaded. The hook prints that revision and the re-check command.

The shape

One release issue, up to three preparation PRs on v2/main, one

merge PR into main, then the Release. In that order: each step needs

the one before it merged.

| | Preparation PRs | The merge PR |

| --- | --- | --- |

| Base | v2/main | main |

| Carries | The audit's forced fixes; the TypeScript version bumps; the Python version stamps | The milestone's work, arriving whole from v2/main. No commits of its own |

| References the release issue with | Closes #N (a cross-reference only, on v2/main) | Part of #N (non-closing: main is the default branch, where Closes would close the issue before anything is published) |

| Verified by | npm run local:gate, CI | npm run local:gate, plus npm run pack:verify, plus every milestone issue exercised, written up as the release ledger |

⚠️ Do not fold them together. A version bump made on the merge branch

exists only downstream of v2/main, and nothing carries it back: the develop

branch would keep reporting the previous version, and the next branch cut from

it would too.

1. The release issue

One per milestone, titled Release vX.Y.Z (the milestone's name), filed

through /issue-create: type chore, no server-scope label, the milestone it

releases. It is what every PR below references, so file it first.

Set its card to In Progress (/board-ops). It stays open until the Release

is published (step 6), whatever merges in between.

N=<RELEASE_ISSUE_NUMBER>
MILESTONE=vX.Y.Z

Check the milestone is complete before preparing anything. The only open

issue left in it should be the release issue itself:

gh issue list --repo modelcontextprotocol/servers --milestone "$MILESTONE" \
  --state open --json number,title --jq '.[] | "#\(.number) \(.title)"'

Anything else open is either finished first or moved to the next milestone by

a maintainer. Do not release around it silently.

2. Preparation PRs, on v2/main

All three are part of the milestone's work, so all three land on the develop

branch and reach main with everything else. **All are merged before the merge

PR is opened.** A milestone that touches only one language, with a clean audit,

has one.

Each branch this skill cuts by hand (the audit, the hand-run CalVer stamp, the

merge branch) goes into its own sibling worktree, as /pr-flow step 2

does, never by switching branches in the primary checkout. Run each recipe from

the primary checkout; the worktree is named for the checkout, the release

issue and the branch's role, since one issue owns several branches.

2a. The audit

Audit first, so the version bumps sit on a tree that was just checked.

git fetch origin v2/main
git worktree add --no-track "../$(basename "$PWD")-$N-audit" \
  -b "v2/chore/$N-release-audit" origin/v2/main
cd "../$(basename "$PWD")-$N-audit" && npm install

# npm: one lockfile covers the root and all four TypeScript workspaces.
npm audit --audit-level=high

# Python: each server has its own lockfile. `uv` has no audit of its own in the
# version pinned here, so the locked requirements go through pip-audit.
# Exported to a file first: piped straight in, a failed `uv export` hands
# pip-audit empty input, which it reports as clean. And pip-audit exits
# non-zero both when it finds something and when it could not run, so a
# server counts as audited only when its output holds a verdict. The block
# runs in a subshell that exits non-zero if any server was not audited.
(
  unaudited=
  for s in fetch git time; do
    echo "== $s"
    REQ=$(mktemp) OUT=$(mktemp)
    if (cd "src/$s" && uv export --frozen --no-emit-project --format requirements-txt) > "$REQ" \
        && [ -s "$REQ" ]; then
      uvx pip-audit --require-hashes --disable-pip -r "$REQ" > "$OUT" 2>&1
      cat "$OUT"
      grep -qE 'No known vulnerabilities found|Found [0-9]+ known vulnerabilit' "$OUT"
评论
Mmodelcontextprotocol
modelcontextprotocol
modelcontextprotocol/servers
查看 GitHub 仓库 查看作者的其他 Skill
来源信息
作者@modelcontextprotocol
所属大类DevOps / Git 工作流
国内可用性通用
最近源活动—
风险提示执行命令、读写文件
提示:风险标签为程序静态扫描结果,仅作提示,不代表安全认证。安装前请阅读 SKILL.md 及其引用的脚本、权限,自行判断是否可信。