Skip to content

Commit 8982ba2

Browse files
Added release workflow
1 parent b8bfda2 commit 8982ba2

File tree

11 files changed

+207
-19
lines changed

11 files changed

+207
-19
lines changed

.github/workflows/release.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: 🦀 MCP-Connect Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*" # Trigger on version tags like v0.1.0
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build-and-release:
13+
name: Build & Release (${{ matrix.target }})
14+
runs-on: ${{ matrix.os }}
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
include:
19+
- os: ubuntu-latest
20+
target: x86_64-unknown-linux-gnu
21+
artifact: mcp-connect-linux-x86_64.tar.gz
22+
ext: ""
23+
- os: macos-latest
24+
target: x86_64-apple-darwin
25+
artifact: mcp-connect-darwin-x86_64.tar.gz
26+
ext: ""
27+
- os: macos-latest
28+
target: aarch64-apple-darwin
29+
artifact: mcp-connect-darwin-aarch64.tar.gz
30+
ext: ""
31+
- os: windows-latest
32+
target: x86_64-pc-windows-msvc
33+
artifact: mcp-connect-windows-x86_64.zip
34+
ext: ".exe"
35+
36+
steps:
37+
- name: 📦 Checkout repository
38+
uses: actions/checkout@v4
39+
40+
- name: 🦀 Setup Rust toolchain
41+
uses: dtolnay/rust-toolchain@stable
42+
with:
43+
targets: ${{ matrix.target }}
44+
45+
- name: ⚡ Cache cargo dependencies
46+
uses: actions/cache@v4
47+
with:
48+
path: |
49+
~/.cargo/registry
50+
~/.cargo/git
51+
target
52+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
53+
54+
- name: 🏗️ Build release binary
55+
run: cargo build --release --locked --target ${{ matrix.target }}
56+
57+
- name: 🗜️ Package binary and checksum
58+
shell: bash
59+
run: |
60+
set -eux
61+
BIN="mcp-connect"
62+
OUT_DIR="dist"
63+
TARGET_DIR="target/${{ matrix.target }}/release"
64+
mkdir -p "$OUT_DIR"
65+
66+
if [[ "${{ matrix.ext }}" == ".exe" ]]; then
67+
cp "${TARGET_DIR}/${BIN}.exe" .
68+
zip -j "${OUT_DIR}/${{ matrix.artifact }}" "${BIN}.exe"
69+
else
70+
tar -czvf "${OUT_DIR}/${{ matrix.artifact }}" -C "${TARGET_DIR}" "${BIN}"
71+
fi
72+
73+
# Generate SHA256 checksum
74+
cd "$OUT_DIR"
75+
shasum -a 256 "${{ matrix.artifact }}" > "${{ matrix.artifact }}.sha256"
76+
77+
- name: 🚀 Publish to GitHub Release
78+
uses: softprops/action-gh-release@v2
79+
with:
80+
files: dist/*
81+
draft: false
82+
prerelease: ${{ contains(github.ref_name, '-rc') || contains(github.ref_name, '-beta') }}
83+
env:
84+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

PROJECT_MINDMAP.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# MCP Remote Proxy - Project Mindmap
1+
# MCP Connect - Project Mindmap
22

33
```
4-
MCP Remote Proxy
4+
MCP Connect
55
66
┌─────────────────────┼─────────────────────┐
77
│ │ │

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ cargo build --release
3131
# Install globally
3232
cargo install --path crates/mcp-connect
3333

34+
# Or using cargo
35+
cargo install --git https://github.com/dreygur/mcp-connect
36+
3437
# Or use pre-built binaries (when available)
3538
# Download from releases page
3639
```

crates/mcp-connect/src/main.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! # MCP Remote Proxy CLI
1+
//! # MCP Connect CLI
22
//!
33
//! Command-line interface for the Model Context Protocol (MCP) remote proxy system.
44
//!
@@ -53,13 +53,13 @@ use std::time::Duration;
5353
use tracing::{error, info, warn, Level};
5454
use tracing_subscriber::FmtSubscriber;
5555

56-
/// Command-line interface for MCP Remote Proxy.
56+
/// Command-line interface for MCP Connect.
5757
///
5858
/// This structure defines the main CLI interface using clap, providing
5959
/// global options and subcommands for different proxy operations.
6060
#[derive(Parser)]
6161
#[command(name = "mcp-connect")]
62-
#[command(about = "MCP Remote Proxy - Bridge local MCP clients to remote MCP servers")]
62+
#[command(about = "MCP Connect - Bridge local MCP clients to remote MCP servers")]
6363
#[command(version = "0.1.0")]
6464
struct Cli {
6565
/// The subcommand to execute
@@ -450,7 +450,7 @@ async fn run_proxy(
450450
user_agent: Option<String>,
451451
debug: bool,
452452
) -> Result<()> {
453-
info!("Starting MCP Remote Proxy");
453+
info!("Starting MCP Connect");
454454
info!("Primary endpoint: {}", endpoint);
455455

456456
// Send MCP notification that proxy is starting

install.ps1

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
$ErrorActionPreference = "Stop"
2+
3+
$owner = "dreygur"
4+
$repo = "mcp-connect"
5+
$binary = "mcp-connect"
6+
$os = "windows"
7+
$arch = "x86_64"
8+
9+
Write-Host "Fetching latest release info..."
10+
$release = Invoke-RestMethod "https://api.github.com/repos/$owner/$repo/releases/latest"
11+
$tag = $release.tag_name
12+
if (-not $tag) {
13+
Write-Error "❌ Could not determine latest release tag."
14+
exit 1
15+
}
16+
17+
$file = "$binary-$os-$arch.zip"
18+
$checksumFile = "$file.sha256"
19+
$baseUrl = "https://github.com/$owner/$repo/releases/download/$tag"
20+
21+
$tmpFile = Join-Path $env:TEMP $file
22+
$tmpChecksum = Join-Path $env:TEMP $checksumFile
23+
$target = "C:\Program Files\$binary"
24+
25+
Write-Host "📦 Downloading $file (version $tag)..."
26+
Invoke-WebRequest "$baseUrl/$file" -OutFile $tmpFile
27+
Invoke-WebRequest "$baseUrl/$checksumFile" -OutFile $tmpChecksum
28+
29+
Write-Host "🔐 Verifying checksum..."
30+
$expectedHash = (Get-Content $tmpChecksum).Split(" ")[0].Trim()
31+
$actualHash = (Get-FileHash $tmpFile -Algorithm SHA256).Hash.ToLower()
32+
if ($expectedHash -ne $actualHash) {
33+
Write-Error "❌ Checksum verification failed! Expected $expectedHash but got $actualHash."
34+
exit 1
35+
}
36+
37+
Write-Host "📂 Extracting to $target..."
38+
if (Test-Path $target) { Remove-Item -Recurse -Force $target }
39+
Expand-Archive -Path $tmpFile -DestinationPath $target -Force
40+
41+
$exePath = Join-Path $target "$binary.exe"
42+
if (-not (Test-Path $exePath)) {
43+
Write-Error "❌ Executable not found after extraction!"
44+
exit 1
45+
}
46+
47+
Write-Host "⚙️ Adding $target to PATH..."
48+
$env:Path += ";$target"
49+
[Environment]::SetEnvironmentVariable("Path", $env:Path, [EnvironmentVariableTarget]::Machine)
50+
51+
Write-Host "✅ Installed $binary successfully!"
52+
& $exePath --version

install.sh

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
BINARY="mcp-connect"
5+
OWNER="dreygur"
6+
REPO="mcp-connect"
7+
8+
# Detect OS and architecture
9+
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
10+
ARCH=$(uname -m)
11+
12+
case "$ARCH" in
13+
x86_64|amd64) ARCH="x86_64" ;;
14+
arm64|aarch64) ARCH="aarch64" ;;
15+
*) echo "❌ Unsupported architecture: $ARCH"; exit 1 ;;
16+
esac
17+
18+
case "$OS" in
19+
linux) FILE="${BINARY}-linux-${ARCH}.tar.gz" ;;
20+
darwin) FILE="${BINARY}-darwin-${ARCH}.tar.gz" ;;
21+
*) echo "❌ Unsupported OS: $OS"; exit 1 ;;
22+
esac
23+
24+
# Fetch latest release tag
25+
TAG=$(curl -s https://api.github.com/repos/$OWNER/$REPO/releases/latest | grep tag_name | cut -d '"' -f 4)
26+
if [ -z "$TAG" ]; then
27+
echo "❌ Could not determine latest release tag."
28+
exit 1
29+
fi
30+
31+
BASE_URL="https://github.com/$OWNER/$REPO/releases/download/$TAG"
32+
CHECKSUM_FILE="${FILE}.sha256"
33+
34+
echo "📦 Downloading ${FILE} (version ${TAG})..."
35+
curl -fsSL "$BASE_URL/$FILE" -o "$FILE"
36+
curl -fsSL "$BASE_URL/$CHECKSUM_FILE" -o "$CHECKSUM_FILE"
37+
38+
echo "🔐 Verifying checksum..."
39+
shasum -a 256 -c "$CHECKSUM_FILE"
40+
41+
echo "📂 Extracting..."
42+
tar -xzf "$FILE"
43+
44+
echo "⚙️ Installing to /usr/local/bin (sudo required)..."
45+
chmod +x "$BINARY"
46+
sudo mv "$BINARY" /usr/local/bin/
47+
48+
echo "✅ Installed $BINARY successfully!"
49+
$BINARY --version

scripts/build-cross-platform.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
# MCP Remote Proxy - Cross-Platform Release Build Script
3+
# MCP Connect - Cross-Platform Release Build Script
44
# Creates standalone binaries for multiple platforms
55

66
set -e
@@ -9,7 +9,7 @@ PROJECT_NAME="mcp-connect"
99
BINARY_NAME="mcp-connect"
1010
DIST_DIR="dist-cross"
1111

12-
echo "🌍 Building cross-platform releases for MCP Remote Proxy..."
12+
echo "🌍 Building cross-platform releases for MCP Connect..."
1313

1414
# Define target platforms
1515
declare -A TARGETS=(
@@ -152,7 +152,7 @@ main() {
152152
# Create platform-specific usage guide
153153
local platform_name=$(basename "$platform_dir")
154154
cat > "$platform_dir/USAGE.txt" << EOF
155-
MCP Remote Proxy - $platform_name Release
155+
MCP Connect - $platform_name Release
156156
157157
This is a fully static binary with no dependencies.
158158

scripts/build-release-simple.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#!/bin/bash
22

3-
# Simple standalone release build for MCP Remote Proxy
3+
# Simple standalone release build for MCP Connect
44

55
set -e
66

7-
echo "🚀 Building standalone MCP Remote Proxy..."
7+
echo "🚀 Building standalone MCP Connect..."
88

99
# Set environment variables for static linking
1010
export OPENSSL_STATIC=1

scripts/build-release.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
# MCP Remote Proxy - Standalone Release Build Script
3+
# MCP Connect - Standalone Release Build Script
44
# Creates a fully static binary with no shared library dependencies
55

66
set -e # Exit on any error
@@ -10,7 +10,7 @@ BINARY_NAME="mcp-connect"
1010
BUILD_DIR="target/release"
1111
DIST_DIR="dist"
1212

13-
echo "🚀 Building standalone release for MCP Remote Proxy..."
13+
echo "🚀 Building standalone release for MCP Connect..."
1414
echo "📦 Target: ${PROJECT_NAME} -> ${BINARY_NAME}"
1515

1616
# Function to print colored output
@@ -147,7 +147,7 @@ cp LICENSE "$DIST_DIR/" 2>/dev/null || echo "LICENSE not found, skipping..."
147147

148148
# Create a simple usage guide
149149
cat > "$DIST_DIR/USAGE.txt" << 'EOF'
150-
MCP Remote Proxy - Standalone Release
150+
MCP Connect - Standalone Release
151151
152152
This is a fully static binary with no dependencies.
153153

scripts/build-static.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/bin/bash
22

3-
# Simple static build for MCP Remote Proxy
3+
# Simple static build for MCP Connect
44
# Creates a binary with statically linked OpenSSL
55

66
set -e
77

8-
echo "🚀 Building MCP Remote Proxy with static OpenSSL..."
8+
echo "🚀 Building MCP Connect with static OpenSSL..."
99

1010
# Set environment for static OpenSSL
1111
export OPENSSL_STATIC=1

0 commit comments

Comments
 (0)