Skip to content

fix: update release.yml to use install.ps1 #11

fix: update release.yml to use install.ps1

fix: update release.yml to use install.ps1 #11

Workflow file for this run

name: CI
on:
push:
branches:
- main
- master
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Verify formatting
run: |
files="$(gofmt -l .)"
if [ -n "$files" ]; then
echo "$files"
exit 1
fi
- name: Verify module files
run: |
go mod tidy
git diff --exit-code go.mod go.sum
- name: Run tests
run: go test ./...
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: v2.8.0
build:
name: Build (${{ matrix.goos }}/${{ matrix.goarch }})
runs-on: ubuntu-latest
needs:
- test
- lint
strategy:
fail-fast: false
matrix:
include:
- goos: linux
goarch: amd64
output: mcp-sqlserver
- goos: windows
goarch: amd64
output: mcp-sqlserver.exe
- goos: darwin
goarch: amd64
output: mcp-sqlserver
- goos: darwin
goarch: arm64
output: mcp-sqlserver
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build binary
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: "0"
run: go build -trimpath -ldflags="-s -w" -o "dist/${{ matrix.goos }}-${{ matrix.goarch }}/${{ matrix.output }}" ./cmd
docker:
name: Docker build
runs-on: ubuntu-latest
needs:
- test
- lint
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build image
run: docker build -t mcp-sqlserver:ci .