Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 52 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ on:
release:
types: [created]

permissions:
contents: write

jobs:
build:
name: Build release binaries
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v5

Expand Down Expand Up @@ -49,6 +48,8 @@ jobs:
build-macos:
name: Build ${{ matrix.artifact }}
runs-on: macos-latest
permissions:
contents: write
strategy:
matrix:
include:
Expand Down Expand Up @@ -80,6 +81,8 @@ jobs:
upload-install-script:
name: Upload install scripts
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v5
- name: Upload install.sh and install.ps1
Expand All @@ -88,3 +91,49 @@ jobs:
files: |
install.sh
install.ps1

publish-mcp-registry:
name: Publish to MCP Registry
runs-on: ubuntu-latest
needs: [build, build-macos]
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v5

- name: Install mcp-publisher
run: |
curl -fsSL "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_linux_amd64.tar.gz" \
| tar xz mcp-publisher

- name: Authenticate to MCP Registry (OIDC)
run: ./mcp-publisher login github-oidc

- name: Patch server.json with version, URLs, and SHA-256 hashes
env:
GH_TOKEN: ${{ github.token }}
run: |
set -euo pipefail

TAG="${{ github.event.release.tag_name }}"
VERSION="${TAG#v}"
BASE="https://github.com/aniongithub/devcontainer-mcp/releases/download/${TAG}"

# Set top-level version
jq --arg v "$VERSION" '.version = $v' server.json > server.tmp && mv server.tmp server.json

# Download each platform artifact, compute SHA-256, patch identifier + hash
PLATFORMS=("linux-x64" "linux-arm64" "darwin-x64" "darwin-arm64")
for platform in "${PLATFORMS[@]}"; do
FILE="devcontainer-mcp-${platform}.tar.gz"
curl -fsSL --retry 5 --retry-delay 3 -o "$FILE" "${BASE}/${FILE}"
SHA="$(sha256sum "$FILE" | awk '{print $1}')"
URL="${BASE}/${FILE}"
jq --arg platform "$platform" --arg url "$URL" --arg sha "$SHA" \
'(.packages[] | select(.identifier | contains($platform))) |= (.identifier = $url | .fileSha256 = $sha)' \
server.json > server.tmp && mv server.tmp server.json
done

- name: Publish to MCP Registry
run: ./mcp-publisher publish
37 changes: 37 additions & 0 deletions server.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
"name": "io.github.aniongithub/devcontainer-mcp",
"title": "devcontainer-mcp",
"description": "MCP server that lets AI agents create, manage, and work inside dev containers across Docker, DevPod, and GitHub Codespaces.",
"repository": {
"url": "https://github.com/aniongithub/devcontainer-mcp",
"source": "github"
},
"version": "0.0.0",
"packages": [
{
"registryType": "mcpb",
"identifier": "https://github.com/aniongithub/devcontainer-mcp/releases/download/v0.0.0/devcontainer-mcp-linux-x64.tar.gz",
"fileSha256": "PLACEHOLDER",
"transport": { "type": "stdio" }
},
{
"registryType": "mcpb",
"identifier": "https://github.com/aniongithub/devcontainer-mcp/releases/download/v0.0.0/devcontainer-mcp-linux-arm64.tar.gz",
"fileSha256": "PLACEHOLDER",
"transport": { "type": "stdio" }
},
{
"registryType": "mcpb",
"identifier": "https://github.com/aniongithub/devcontainer-mcp/releases/download/v0.0.0/devcontainer-mcp-darwin-x64.tar.gz",
"fileSha256": "PLACEHOLDER",
"transport": { "type": "stdio" }
},
{
"registryType": "mcpb",
"identifier": "https://github.com/aniongithub/devcontainer-mcp/releases/download/v0.0.0/devcontainer-mcp-darwin-arm64.tar.gz",
"fileSha256": "PLACEHOLDER",
"transport": { "type": "stdio" }
}
]
}