Skip to content

Open-source Revit MCP server: let Claude and other AI assistants read and edit BIM models, with human approval on every change.

ci(release): publish to the MCP Registry automatically after each stable release

sammohammad57892711c010b3d
diff --git a/.github/workflows/publish-mcp.yml b/.github/workflows/publish-mcp.yml
index d73e157..f9fc582 100644
--- a/.github/workflows/publish-mcp.yml
+++ b/.github/workflows/publish-mcp.yml
@@ -17,15 +17,17 @@ jobs:
- name: Checkout code
uses: actions/checkout@v5
+ # The version comes from the VERSION file at the checked-out ref, not from
+ # the ref name, so this works for a release event, a manual run on main,
+ # and the dispatch that release.yml fires for each stable tag.
- name: Synchronize release artifact metadata
- if: github.event_name == 'release'
shell: bash
env:
GH_TOKEN: ${{ github.token }}
run: |
- version="${GITHUB_REF_NAME#v}"
+ version="$(tr -d '[:space:]' < VERSION)"
asset="aec-model-bridge-${version}.mcpb"
- gh release download "$GITHUB_REF_NAME" --pattern "$asset" --dir release
+ gh release download "v${version}" --pattern "$asset" --dir release
sha256="$(sha256sum "release/$asset" | cut -d' ' -f1)"
python - "$version" "$sha256" <<'PY'
import json
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 14395b8..b11daa0 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -24,6 +24,7 @@ jobs:
runs-on: windows-latest
permissions:
contents: write
+ actions: write
steps:
- name: Resolve tag
@@ -94,3 +95,12 @@ jobs:
gh release create $tag (Get-ChildItem dist/release/*).FullName `
--verify-tag --title "AEC Model Bridge $tag" --notes-file release-notes.md @flags
}
+
+ - name: Publish to the MCP Registry
+ if: steps.tag.outputs.prerelease == 'false'
+ shell: pwsh
+ env:
+ GH_TOKEN: ${{ github.token }}
+ # A release created with the default token does not fire release-event workflows,
+ # but workflow_dispatch does, so start the registry publish explicitly.
+ run: gh workflow run publish-mcp.yml --ref "${{ steps.tag.outputs.tag }}"
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4aeae77..0a12470 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,8 @@
## Unreleased
+- Release: the MCP Registry publish now starts automatically after each stable release and reads the version from `VERSION`, so the bundle hash is no longer left stale.
+
## 1.3.1 - 2026-10-09
- Release: every GitHub release now ships one ready-to-install package per supported Revit year (`aec-model-bridge-revit-2024-X.Y.Z.zip` through `-2027-`). 1.3.0 only shipped the Revit 2027 package. `build-release.ps1` defaults to all years, and the release workflow installs the .NET 8 SDK that the 2024-2026 builds need.
diff --git a/docs/versioning.md b/docs/versioning.md
index a6eadfa..095a4ce 100644
--- a/docs/versioning.md
+++ b/docs/versioning.md
@@ -53,7 +53,7 @@ Pre-releases use a hyphen suffix: `1.4.0-rc.1`, `1.4.0-beta.2`. GitHub marks the
```
4. The **Build GitHub Release** workflow starts on the tag. It confirms the tag, `VERSION`, every manifest and the changelog agree, runs the Python tests, builds the add-in and installer bundle, and publishes the GitHub release with the changelog section as its notes.
-5. Publishing the release starts **Publish MCP Server**, which fills in the bundle hash for the registry.
+5. For stable tags the release workflow then starts **Publish MCP Server**, which fills in the bundle hash and publishes to the MCP Registry. Pre-releases are not sent to the registry.
If the tag and `VERSION` disagree, or the changelog has no section for that version, the release stops before building anything.