1- name : Release Go Binaries
1+ name : Release
22
33on :
44 push :
55 tags :
6- - ' v*'
7- workflow_dispatch :
8- inputs :
9- tag :
10- description : ' Tag to release (e.g., v1.0.0)'
11- required : true
12- type : string
6+ - " v*"
137
148env :
15- GO_VERSION : " 1.23 "
9+ GO_VERSION : " 1.25 "
1610
1711jobs :
1812 test :
4842 uses : golangci/golangci-lint-action@v4
4943 with :
5044 version : latest
51- args : --timeout=5m
45+ args : --timeout=5m --tests=false
5246
5347 - name : Run tests
5448 env :
9387 - name : Get version
9488 id : version
9589 run : |
96- if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
97- echo "VERSION=${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT
98- else
99- echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
100- fi
90+ echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
10191
10292 - name : Build binary
10393 env :
@@ -116,13 +106,13 @@ jobs:
116106 # For macOS, we'll use a different approach with osxcross or build on macOS runners
117107 echo "Building for macOS..."
118108 fi
119-
109+
120110 mkdir -p dist
121111 binary_name="mcp-oauth-proxy-${{ steps.version.outputs.VERSION }}-${{ matrix.name }}"
122112 if [ "${{ matrix.goos }}" = "windows" ]; then
123113 binary_name="${binary_name}.exe"
124114 fi
125-
115+
126116 go build -o "dist/${binary_name}" \
127117 -ldflags="-X main.version=${{ steps.version.outputs.VERSION }} -X main.buildTime=$(date -u +%Y-%m-%dT%H:%M:%SZ) -s -w" \
128118 .
@@ -160,11 +150,7 @@ jobs:
160150 - name : Get version
161151 id : version
162152 run : |
163- if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
164- echo "VERSION=${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT
165- else
166- echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
167- fi
153+ echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
168154
169155 - name : Build binary
170156 env :
@@ -174,7 +160,7 @@ jobs:
174160 run : |
175161 mkdir -p dist
176162 binary_name="mcp-oauth-proxy-${{ steps.version.outputs.VERSION }}-${{ matrix.name }}"
177-
163+
178164 go build -o "dist/${binary_name}" \
179165 -ldflags="-X main.version=${{ steps.version.outputs.VERSION }} -X main.buildTime=$(date -u +%Y-%m-%dT%H:%M:%SZ) -s -w" \
180166 .
@@ -193,11 +179,7 @@ jobs:
193179 - name : Get version
194180 id : version
195181 run : |
196- if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
197- echo "VERSION=${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT
198- else
199- echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
200- fi
182+ echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
201183
202184 - name : Download macOS binaries
203185 uses : actions/download-artifact@v4
@@ -208,14 +190,14 @@ jobs:
208190 - name : Create universal binary
209191 run : |
210192 mkdir -p dist
211-
193+
212194 # Find the actual binary files
213195 amd64_binary=$(find ./binaries -name "*darwin-amd64*" -type f | head -1)
214196 arm64_binary=$(find ./binaries -name "*darwin-arm64*" -type f | head -1)
215-
197+
216198 echo "AMD64 binary: $amd64_binary"
217199 echo "ARM64 binary: $arm64_binary"
218-
200+
219201 # Create universal binary
220202 lipo -create \
221203 "$amd64_binary" \
@@ -235,19 +217,15 @@ jobs:
235217 permissions :
236218 contents : read
237219 packages : write
238-
220+
239221 steps :
240222 - name : Checkout repository
241223 uses : actions/checkout@v4
242224
243225 - name : Get version
244226 id : version
245227 run : |
246- if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
247- echo "VERSION=${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT
248- else
249- echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
250- fi
228+ echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
251229
252230 - name : Set up Docker Buildx
253231 uses : docker/setup-buildx-action@v3
@@ -288,19 +266,15 @@ jobs:
288266 runs-on : ubuntu-latest
289267 permissions :
290268 contents : write
291-
269+
292270 steps :
293271 - name : Checkout repository
294272 uses : actions/checkout@v4
295273
296274 - name : Get version
297275 id : version
298276 run : |
299- if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
300- echo "VERSION=${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT
301- else
302- echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
303- fi
277+ echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
304278
305279 - name : Download all artifacts
306280 uses : actions/download-artifact@v4
@@ -312,11 +286,11 @@ jobs:
312286 run : |
313287 mkdir -p release
314288 find ./artifacts -type f -name "mcp-oauth-proxy-*" -exec cp {} release/ \;
315-
289+
316290 # Create checksums
317291 cd release
318292 sha256sum * > checksums.txt
319-
293+
320294 # List files for verification
321295 echo "Release files:"
322296 ls -la
@@ -326,40 +300,40 @@ jobs:
326300 run : |
327301 cat << 'EOF' > CHANGELOG.md
328302 ## What's Changed in ${{ steps.version.outputs.VERSION }}
329-
303+
330304 ### 🚀 Features
331305 - Cross-platform release with native binaries for Linux and macOS
332306 - Multi-architecture Docker images for Linux (AMD64 and ARM64)
333-
307+
334308 ### 📦 Binary Downloads
335309 - **Linux AMD64**: `mcp-oauth-proxy-${{ steps.version.outputs.VERSION }}-linux-amd64`
336310 - **Linux ARM64**: `mcp-oauth-proxy-${{ steps.version.outputs.VERSION }}-linux-arm64`
337311 - **macOS Universal**: `mcp-oauth-proxy-${{ steps.version.outputs.VERSION }}-darwin-universal` (Intel + Apple Silicon)
338312 - **macOS AMD64**: `mcp-oauth-proxy-${{ steps.version.outputs.VERSION }}-darwin-amd64` (Intel)
339313 - **macOS ARM64**: `mcp-oauth-proxy-${{ steps.version.outputs.VERSION }}-darwin-arm64` (Apple Silicon)
340-
314+
341315 ### 🐳 Docker Images
342316 - **Tagged Release**: `ghcr.io/${{ github.repository_owner }}/mcp-oauth-proxy:${{ steps.version.outputs.VERSION }}`
343317 - **Latest**: `ghcr.io/${{ github.repository_owner }}/mcp-oauth-proxy:latest`
344318 - **Platforms**: linux/amd64, linux/arm64
345-
319+
346320 ### 🔍 Verification
347321 All binaries can be verified using the included `checksums.txt` file.
348-
322+
349323 ### 🛠️ Installation
350-
324+
351325 **Binary Installation:**
352326 1. Download the appropriate binary for your platform
353327 2. Make it executable: `chmod +x mcp-oauth-proxy-*`
354328 3. Move to your PATH: `mv mcp-oauth-proxy-* /usr/local/bin/mcp-oauth-proxy`
355-
329+
356330 **Docker Installation:**
357331 ```bash
358332 docker pull ghcr.io/${{ github.repository_owner }}/mcp-oauth-proxy:${{ steps.version.outputs.VERSION }}
359333 # or
360334 docker pull ghcr.io/${{ github.repository_owner }}/mcp-oauth-proxy:latest
361335 ```
362-
336+
363337 **Full Changelog**: https://github.com/${{ github.repository }}/commits/${{ steps.version.outputs.VERSION }}
364338 EOF
365339
@@ -373,4 +347,5 @@ jobs:
373347 draft : false
374348 prerelease : ${{ contains(steps.version.outputs.VERSION, '-') }}
375349 token : ${{ secrets.GITHUB_TOKEN }}
376- generateReleaseNotes : true
350+ generateReleaseNotes : true
351+ allowUpdates : true
0 commit comments