Skip to content

build path

build path #2

Workflow file for this run

name: Build
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
goos: [windows, linux, darwin]
goarch: [amd64, arm64]
exclude:
- goos: windows
goarch: arm64
- goos: darwin
goarch: amd64
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.24'
- name: Build
run: |
GOOS=${{ matrix.goos }}
GOARCH=${{ matrix.goarch }}
GOARM=7
CGO_ENABLED=0
output_name="godoc-mcp-server-${GOOS}-${GOARCH}"
if [ "${GOOS}" = "windows" ]; then
output_name="${output_name}.exe"
fi
go build -ldflags="-s -w" -o "${output_name}" ./cmd/godoc-mcp-server
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: godoc-mcp-server-${{ matrix.goos }}-${{ matrix.goarch }}${{ matrix.goos == 'windows' && '.exe' || '' }}
tag: latest
overwrite: true