44 push :
55 tags : ["v*"]
66
7+ permissions :
8+ contents : write
9+
710jobs :
811 build :
912 strategy :
@@ -14,21 +17,25 @@ jobs:
1417 goarch : amd64
1518 cgo : " 0"
1619 name : mcpproxy-linux-amd64
20+ archive_format : tar.gz
1721 - os : ubuntu-latest
1822 goos : windows
1923 goarch : amd64
2024 cgo : " 0"
2125 name : mcpproxy-windows-amd64.exe
26+ archive_format : zip
2227 - os : macos-latest
2328 goos : darwin
2429 goarch : amd64
2530 cgo : " 1"
2631 name : mcpproxy-darwin-amd64
32+ archive_format : tar.gz
2733 - os : macos-latest
2834 goos : darwin
2935 goarch : arm64
3036 cgo : " 1"
3137 name : mcpproxy-darwin-arm64
38+ archive_format : tar.gz
3239
3340 runs-on : ${{ matrix.os }}
3441
5461 - name : Download dependencies
5562 run : go mod download
5663
57- - name : Build binary
64+ - name : Build binary and create archives
5865 env :
5966 CGO_ENABLED : ${{ matrix.cgo }}
6067 GOOS : ${{ matrix.goos }}
@@ -63,25 +70,56 @@ jobs:
6370 VERSION=${GITHUB_REF#refs/tags/}
6471 LDFLAGS="-s -w -X mcpproxy-go/cmd/mcpproxy.version=${VERSION}"
6572
66- # Build versioned binary
73+ # Determine clean binary name
74+ if [ "${{ matrix.goos }}" = "windows" ]; then
75+ CLEAN_BINARY="mcpproxy.exe"
76+ else
77+ CLEAN_BINARY="mcpproxy"
78+ fi
79+
80+ # Build binary with original name for individual download
6781 go build -ldflags "${LDFLAGS}" -o ${{ matrix.name }} ./cmd/mcpproxy
6882
83+ # Create clean binary for archive
84+ go build -ldflags "${LDFLAGS}" -o ${CLEAN_BINARY} ./cmd/mcpproxy
85+
86+ # Create archive with version info
87+ ARCHIVE_BASE="mcpproxy-${VERSION#v}-${{ matrix.goos }}-${{ matrix.goarch }}"
88+ LATEST_ARCHIVE_BASE="mcpproxy-latest-${{ matrix.goos }}-${{ matrix.goarch }}"
89+
90+ if [ "${{ matrix.archive_format }}" = "zip" ]; then
91+ # Create versioned archive
92+ zip "${ARCHIVE_BASE}.zip" ${CLEAN_BINARY}
93+ # Create latest archive
94+ zip "${LATEST_ARCHIVE_BASE}.zip" ${CLEAN_BINARY}
95+ else
96+ # Create versioned archive
97+ tar -czf "${ARCHIVE_BASE}.tar.gz" ${CLEAN_BINARY}
98+ # Create latest archive
99+ tar -czf "${LATEST_ARCHIVE_BASE}.tar.gz" ${CLEAN_BINARY}
100+ fi
101+
69102 # Create latest binary (copy of the versioned one)
70- LATEST_NAME=$(echo "${{ matrix.name }}" | sed 's/-[^-]*-/-latest-/' | sed 's/\.exe$/-latest.exe/' )
103+ LATEST_NAME=$(echo "${{ matrix.name }}" | sed 's/-[^-]*-/-latest-/')
71104 cp ${{ matrix.name }} ${LATEST_NAME}
72105
73106 - name : Upload versioned binary artifact
74107 uses : actions/upload-artifact@v4
75108 with :
76- name : ${{ matrix.name }}
109+ name : binary- ${{ matrix.name }}
77110 path : ${{ matrix.name }}
78111
79112 - name : Upload latest binary artifact
80113 uses : actions/upload-artifact@v4
81114 with :
82- name : ${{ matrix.name }}-latest
83- path : |
84- mcpproxy-latest-*
115+ name : binary-${{ matrix.name }}-latest
116+ path : mcpproxy-latest-*
117+
118+ - name : Upload versioned archive artifact
119+ uses : actions/upload-artifact@v4
120+ with :
121+ name : archive-${{ matrix.goos }}-${{ matrix.goarch }}
122+ path : mcpproxy-*.${{ matrix.archive_format }}
85123
86124 release :
87125 needs : build
@@ -107,28 +145,51 @@ jobs:
107145 uses : softprops/action-gh-release@v2
108146 with :
109147 files : |
110- dist/*/mcpproxy- *
148+ dist/*/*
111149 body : |
112150 ## mcpproxy ${{ github.ref_name }}
113151
114152 Smart MCP Proxy - Intelligent tool discovery and proxying for Model Context Protocol servers.
115153
116154 ### Quick Download Links
117155
118- **Latest Version (auto-updates):**
156+ **Archives (Recommended - Clean Binary Names):**
157+
158+ *Latest Version (auto-updates):*
159+ - [Linux AMD64](https://github.com/${{ github.repository }}/releases/latest/download/mcpproxy-latest-linux-amd64.tar.gz)
160+ - [Windows AMD64](https://github.com/${{ github.repository }}/releases/latest/download/mcpproxy-latest-windows-amd64.zip)
161+ - [macOS AMD64](https://github.com/${{ github.repository }}/releases/latest/download/mcpproxy-latest-darwin-amd64.tar.gz)
162+ - [macOS ARM64](https://github.com/${{ github.repository }}/releases/latest/download/mcpproxy-latest-darwin-arm64.tar.gz)
163+
164+ *This Version (${{ github.ref_name }}):*
165+ - [Linux AMD64](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/mcpproxy-${{ github.ref_name }}-linux-amd64.tar.gz)
166+ - [Windows AMD64](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/mcpproxy-${{ github.ref_name }}-windows-amd64.zip)
167+ - [macOS AMD64](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/mcpproxy-${{ github.ref_name }}-darwin-amd64.tar.gz)
168+ - [macOS ARM64](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/mcpproxy-${{ github.ref_name }}-darwin-arm64.tar.gz)
169+
170+ **Individual Binaries:**
171+
172+ *Latest Version (auto-updates):*
119173 - [Linux AMD64](https://github.com/${{ github.repository }}/releases/latest/download/mcpproxy-latest-linux-amd64)
120174 - [Windows AMD64](https://github.com/${{ github.repository }}/releases/latest/download/mcpproxy-latest-windows-amd64.exe)
121175 - [macOS AMD64](https://github.com/${{ github.repository }}/releases/latest/download/mcpproxy-latest-darwin-amd64)
122176 - [macOS ARM64](https://github.com/${{ github.repository }}/releases/latest/download/mcpproxy-latest-darwin-arm64)
123177
124- ** This Version (${{ github.ref_name }}):* *
178+ *This Version (${{ github.ref_name }}):*
125179 - [Linux AMD64](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/mcpproxy-linux-amd64)
126180 - [Windows AMD64](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/mcpproxy-windows-amd64.exe)
127181 - [macOS AMD64](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/mcpproxy-darwin-amd64)
128182 - [macOS ARM64](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/mcpproxy-darwin-arm64)
129183
130184 ### Installation
131185
186+ **From Archive (Recommended):**
187+ 1. Download the appropriate archive for your platform using the links above
188+ 2. Extract the archive: `tar -xzf mcpproxy-*.tar.gz` (Linux/macOS) or unzip (Windows)
189+ 3. Make it executable: `chmod +x mcpproxy` (Linux/macOS)
190+ 4. Run `./mcpproxy` to start
191+
192+ **From Individual Binary:**
132193 1. Download the appropriate binary for your platform using the links above
133194 2. Make it executable: `chmod +x mcpproxy-*` (Linux/macOS)
134195 3. Run `./mcpproxy-*` to start
0 commit comments