Skip to content

Upgrade to mcp-server-framework v1.2.2 - Fix MCP Protocol Compliance … #11

Upgrade to mcp-server-framework v1.2.2 - Fix MCP Protocol Compliance …

Upgrade to mcp-server-framework v1.2.2 - Fix MCP Protocol Compliance … #11

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
packages: write
jobs:
build-binaries:
name: Build Binaries
runs-on: ubuntu-latest
strategy:
matrix:
include:
- os: linux
arch: amd64
- os: linux
arch: arm64
- os: darwin
arch: amd64
- os: darwin
arch: arm64
- os: windows
arch: amd64
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.20'
- name: Build binary
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
run: |
output_name="mcp-server-devpod-${{ matrix.os }}-${{ matrix.arch }}"
if [ "${{ matrix.os }}" = "windows" ]; then
output_name="${output_name}.exe"
fi
go build -o "${output_name}" -ldflags="-s -w -X main.version=${{ github.ref_name }}" main.go
# Create archive with different formats for different platforms
if [ "${{ matrix.os }}" = "windows" ]; then
zip "${output_name}.zip" "${output_name}" README.md LICENSE
else
tar czf "${output_name}.tar.gz" "${output_name}" README.md LICENSE
fi
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: binary-${{ matrix.os }}-${{ matrix.arch }}
path: |
*.tar.gz
*.zip
retention-days: 1
create-release:
name: Create Release
needs: build-binaries
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: ./artifacts
- name: Prepare release assets
run: |
mkdir -p ./release-assets
find ./artifacts -name "*.tar.gz" -o -name "*.zip" | xargs -I {} cp {} ./release-assets/
ls -la ./release-assets/
- name: Generate release notes
id: release_notes
run: |
echo "## What's Changed" > release_notes.md
echo "" >> release_notes.md
echo "### 🚀 Features" >> release_notes.md
echo "- DevPod MCP Server release ${{ github.ref_name }}" >> release_notes.md
echo "" >> release_notes.md
echo "### 📦 Downloads" >> release_notes.md
echo "Choose the appropriate binary for your platform:" >> release_notes.md
echo "" >> release_notes.md
for file in ./release-assets/*; do
filename=$(basename "$file")
echo "- **$filename**" >> release_notes.md
done
echo "" >> release_notes.md
echo "### 🐳 Docker" >> release_notes.md
echo "\`\`\`bash" >> release_notes.md
echo "docker pull ghcr.io/${{ github.repository }}:${{ github.ref_name }}" >> release_notes.md
echo "\`\`\`" >> release_notes.md
- name: Create Release
uses: softprops/action-gh-release@v2
with:
files: ./release-assets/*
body_path: release_notes.md
draft: false
prerelease: ${{ contains(github.ref_name, '-') }}
generate_release_notes: true
docker-release:
name: Docker Release
needs: create-release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=ref,event=tag
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max