Skip to content

Agent Mesh

build: add goreleaser config and github action

Antonio Ojea22beafa8b656
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 00000000..2801276f
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,32 @@
+name: goreleaser
+
+on:
+ push:
+ # run only against tags
+ tags:
+ - "*"
+
+permissions:
+ contents: write
+ packages: write
+
+jobs:
+ goreleaser:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ - name: Set up Go
+ uses: actions/setup-go@v5
+ with:
+ go-version: stable
+ - name: Run GoReleaser
+ uses: goreleaser/goreleaser-action@v5
+ with:
+ distribution: goreleaser
+ version: latest
+ args: release --clean
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.goreleaser.yaml b/.goreleaser.yaml
new file mode 100644
index 00000000..8783fc6a
--- /dev/null
+++ b/.goreleaser.yaml
@@ -0,0 +1,57 @@
+version: 1
+project_name: sam
+builds:
+ - id: sam-node
+ main: ./cmd/sam-node
+ binary: sam-node
+ env:
+ - CGO_ENABLED=0
+ goos:
+ - linux
+ - windows
+ - darwin
+ goarch:
+ - amd64
+ - arm64
+ ldflags:
+ - -s -w
+ - id: sam-hub
+ main: ./cmd/sam-hub
+ binary: sam-hub
+ env:
+ - CGO_ENABLED=0
+ goos:
+ - linux
+ - windows
+ - darwin
+ goarch:
+ - amd64
+ - arm64
+ ldflags:
+ - -s -w
+ - id: mcp-client
+ main: ./cmd/mcp-client
+ binary: mcp-client
+ env:
+ - CGO_ENABLED=0
+ goos:
+ - linux
+ - windows
+ - darwin
+ goarch:
+ - amd64
+ - arm64
+ ldflags:
+ - -s -w
+archives:
+ - format: tar.gz
+ name_template: >-
+ {{ .ProjectName }}_
+ {{- title .Os }}_
+ {{- if eq .Arch "amd64" }}x86_64
+ {{- else if eq .Arch "386" }}i386
+ {{- else }}{{ .Arch }}{{ end }}
+ {{- if .Arm }}v{{ .Arm }}{{ end }}
+ format_overrides:
+ - goos: windows
+ format: zip