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