Skip to content

feat: register DevLens MCP in the official registry (server.json + mc… #3

feat: register DevLens MCP in the official registry (server.json + mc…

feat: register DevLens MCP in the official registry (server.json + mc… #3

Workflow file for this run

name: release
# Tag a release to publish: git tag v0.3.0 && git push origin v0.3.0
on:
push:
tags:
- "v*"
permissions:
contents: write # needed to upload binaries to the GitHub Release
id-token: write # needed for npm Trusted Publishing (OIDC) — no NPM_TOKEN required
jobs:
release:
# bun cross-compiles every target from one Linux runner — no per-OS matrix.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
# Node is used to publish to npm and to run the helper scripts.
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
# Trusted Publishing (OIDC) needs npm >= 11.5; setup-node's Node 20 ships npm 10.
- name: Upgrade npm for Trusted Publishing
run: npm install -g npm@latest
- name: Derive version from tag
id: ver
run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Sync version across all packages
run: node scripts/set-version.mjs "${{ steps.ver.outputs.version }}"
- name: Build all platform binaries
run: bun run build:binaries
- name: Stage binaries into platform packages
run: bun run stage:binaries
# Publish platform packages FIRST so the main package's optionalDependencies resolve.
- name: Publish platform packages
run: |
for dir in npm/*/; do
echo "publishing $dir"
(cd "$dir" && npm publish --access public)
done
- name: Publish main package
run: npm publish --access public
# Also attach the raw binaries to the GitHub Release (for the install-script channel).
- name: Upload binaries to GitHub Release
uses: softprops/action-gh-release@v2
with:
files: dist/bin/*
# Publish server metadata to the official MCP Registry (tokenless via GitHub OIDC).
# Last, so a registry hiccup (e.g. npm propagation lag) can't block the npm/GitHub
# release. set-version.mjs already synced server.json to this release's version.
- name: Install mcp-publisher
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 xz mcp-publisher
- name: Authenticate to MCP Registry (OIDC)
run: ./mcp-publisher login github-oidc
- name: Publish server to MCP Registry
run: ./mcp-publisher publish