-
Notifications
You must be signed in to change notification settings - Fork 38
155 lines (133 loc) · 5.12 KB
/
Copy pathrelease.yml
File metadata and controls
155 lines (133 loc) · 5.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
name: Build and Release
on:
push:
tags: ["v*"]
permissions:
contents: write
packages: write
jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-22.04
goos: linux
goarch: amd64
ext: ""
artifact_name: "mcpproxy-linux-amd64"
package_cmd: "tar -czf mcpproxy-${{ github.ref_name }}-linux-amd64.tar.gz mcpproxy"
- os: windows-latest
goos: windows
goarch: amd64
ext: ".exe"
artifact_name: "mcpproxy-windows-amd64"
ldflags: "-H windowsgui"
package_cmd: "7z a mcpproxy-${{ github.ref_name }}-windows-amd64.zip mcpproxy.exe"
- os: macos-14
goos: darwin
goarch: "amd64 arm64" # Universal binary
ext: ""
artifact_name: "mcpproxy-macos-universal"
package_cmd: "ditto -ck --rsrc --sequesterRsrc mcpproxy mcpproxy-${{ github.ref_name }}-macos-universal.zip"
runs-on: ${{ matrix.os }}
env:
CGO_ENABLED: "1"
GO111MODULE: "on"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# Linux-only: install GUI headers
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y gcc libgtk-3-dev libayatana-appindicator3-dev
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.23"
- name: Get version
id: version
run: echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Build for macOS Universal
if: matrix.goos == 'darwin'
run: |
mkdir -p build
# Build for both architectures separately
GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 go build -ldflags "-s -w -X main.version=${{ steps.version.outputs.version }}" -o build/mcpproxy_amd64 ./cmd/mcpproxy
GOOS=darwin GOARCH=arm64 CGO_ENABLED=1 go build -ldflags "-s -w -X main.version=${{ steps.version.outputs.version }}" -o build/mcpproxy_arm64 ./cmd/mcpproxy
# Combine into universal binary
lipo -create -output build/mcpproxy build/mcpproxy_amd64 build/mcpproxy_arm64
# Clean up individual binaries
rm build/mcpproxy_amd64 build/mcpproxy_arm64
- name: Build for Linux/Windows
if: matrix.goos != 'darwin'
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: "1"
run: |
mkdir -p build
go build -ldflags "-s -w -X main.version=${{ steps.version.outputs.version }} ${{ matrix.ldflags }}" -o build/mcpproxy${{ matrix.ext }} ./cmd/mcpproxy
- name: Package artifacts (Linux/macOS)
if: runner.os != 'Windows'
run: |
cd build
cp ../README.md .
if [ -f ../assets/icons/icon.svg ]; then
mkdir -p assets/icons
cp ../assets/icons/icon.svg assets/icons/
fi
${{ matrix.package_cmd }}
- name: Package artifacts (Windows)
if: runner.os == 'Windows'
run: |
cd build
Copy-Item ../README.md .
if (Test-Path ../assets/icons/icon.svg) {
New-Item -ItemType Directory -Force -Path assets/icons
Copy-Item ../assets/icons/icon.svg assets/icons/
}
${{ matrix.package_cmd }}
- name: Upload artifacts to release
uses: softprops/action-gh-release@v2
with:
files: build/mcpproxy-*
draft: false
prerelease: false
generate_release_notes: true
body: |
## mcpproxy ${{ steps.version.outputs.version }}
Smart MCP Proxy - Intelligent tool discovery and proxying for Model Context Protocol servers.
### Changes in this release
- Full GUI/System Tray support on all platforms
- Native builds with CGO support for optimal performance
- Cross-platform compatibility (Linux, Windows, macOS)
### Installation
#### Download and Run
1. Download the appropriate archive for your platform
2. Extract the binary
3. Run `mcpproxy` to start with system tray, or `mcpproxy --tray=false` for headless mode
#### macOS
- Download `mcpproxy-*-macos-universal.zip`
- Right-click → Open to bypass Gatekeeper (unsigned app)
#### Windows
- Download `mcpproxy-*-windows-amd64.zip`
- Extract and run `mcpproxy.exe`
#### Linux
- Download `mcpproxy-*-linux-amd64.tar.gz`
- Extract: `tar -xzf mcpproxy-*-linux-amd64.tar.gz`
- Run: `./mcpproxy`
- Requires GTK3 and AppIndicator libraries
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Optional: Create macOS DMG (can be added later)
# macos-dmg:
# needs: build
# runs-on: macos-14
# if: github.event.repository.default_branch == 'main'
# steps:
# - name: Create DMG
# run: echo "DMG creation can be added here later"