diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index affe341..0b0ce92 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -177,17 +177,23 @@ jobs: # Treat a tag with a pre-release suffix (e.g. v1.0.0-rc.1) as a pre-release. prerelease: ${{ contains(needs.prepare.outputs.tag, '-') }} + # The MCP Registry ranks versions by semver, so a pre-release above the current stable version + # (e.g. 1.2.0-beta.1 over 1.1.0) would become its "latest". Only stable tags go to the Registry. - name: Update server.json version + if: ${{ !contains(needs.prepare.outputs.tag, '-') }} run: bash .github/scripts/set-server-json-version.sh "$VERSION" - name: Install mcp-publisher + if: ${{ !contains(needs.prepare.outputs.tag, '-') }} run: | curl -L "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar -xzf - - name: Wait for NuGet.org validation + if: ${{ !contains(needs.prepare.outputs.tag, '-') }} run: sleep 300 - name: Publish to MCP Registry + if: ${{ !contains(needs.prepare.outputs.tag, '-') }} uses: nick-fields/retry@v4 with: timeout_minutes: 15 diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md index cd99071..f3c8028 100644 --- a/ARCHITECTURE.md +++ b/ARCHITECTURE.md @@ -128,13 +128,17 @@ Tag push (v*) ├── dotnet nuget push libraries + native + any → NuGet.org, GitHub Packages ├── wait until NuGet.org lists all 14 tool packages (30 min timeout) ├── dotnet nuget push pointer packages → NuGet.org, GitHub Packages - ├── Create GitHub Release with every package attached - ├── stamp the server.json version (.github/scripts/set-server-json-version.sh) - ├── wait 300 s for NuGet.org package validation - └── mcp-publisher publish (GitHub OIDC auth, no token required) - └── Submits src/ProjGraph.Mcp/.mcp/server.json to the Official MCP Registry + ├── Create GitHub Release with every package attached (a pre-release for tags like v1.2.0-beta.1) + └── stable tags only (no `-` suffix): + ├── stamp the server.json version (.github/scripts/set-server-json-version.sh) + ├── wait 300 s for NuGet.org package validation + └── mcp-publisher publish (GitHub OIDC auth, no token required) + └── Submits src/ProjGraph.Mcp/.mcp/server.json to the Official MCP Registry ``` +Pre-release tags skip the MCP Registry: it ranks versions by semver, so `1.2.0-beta.1` would become its +"latest" over `1.1.0`. + `pack.yml` also runs on pull requests that change a project file under `src/`, the MCP `server.json`, `ProjGraph.slnx`, the smoke suite, the packaging scripts, `Directory.*.props`, or `global.json`. diff --git a/CLAUDE.md b/CLAUDE.md index 67e1108..231d0e9 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -90,4 +90,4 @@ Application/ ### Release -Releases are triggered by pushing a `v*` tag. `publish.yml` builds and tests with `-p:Version` from the tag, then calls `pack.yml`. That workflow packs and smoke-tests the Native AOT tool packages on a matching runner for each RID (Alpine for `linux-musl-*`) and packs the libraries, the `any` fallbacks, and the two pointer packages. `publish` then pushes everything except the pointer packages to NuGet.org and GitHub Packages, waits until NuGet.org lists all 14 tool packages, pushes the pointer packages, creates a GitHub Release, and submits to the MCP Registry via `mcp-publisher`. See `ARCHITECTURE.md` ("Tool Packages") before changing `ToolPackageRuntimeIdentifiers`. The MCP Registry ownership comment (``) must remain at the end of `src/ProjGraph.Mcp/README.md`. +Releases are triggered by pushing a `v*` tag. `publish.yml` builds and tests with `-p:Version` from the tag, then calls `pack.yml`. That workflow packs and smoke-tests the Native AOT tool packages on a matching runner for each RID (Alpine for `linux-musl-*`) and packs the libraries, the `any` fallbacks, and the two pointer packages. `publish` then pushes everything except the pointer packages to NuGet.org and GitHub Packages, waits until NuGet.org lists all 14 tool packages, pushes the pointer packages, creates a GitHub Release, and submits to the MCP Registry via `mcp-publisher`. Pre-release tags (containing `-`, e.g. `v1.2.0-beta.1`) get a GitHub pre-release and skip the MCP Registry, which would otherwise rank them "latest". See `ARCHITECTURE.md` ("Tool Packages") before changing `ToolPackageRuntimeIdentifiers`. The MCP Registry ownership comment (``) must remain at the end of `src/ProjGraph.Mcp/README.md`.