Skip to content

Commit c8df269

Browse files
authored
Merge pull request #7 from agentsdance/brew
feat(release): add automated release workflow with GoReleaser
2 parents b08d48c + f608b2e commit c8df269

4 files changed

Lines changed: 184 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
goreleaser:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Set up Go
21+
uses: actions/setup-go@v5
22+
with:
23+
go-version: "1.25"
24+
25+
- name: Run GoReleaser
26+
uses: goreleaser/goreleaser-action@v6
27+
with:
28+
distribution: goreleaser
29+
version: "~> v2"
30+
args: release --clean
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
# For pushing to homebrew-tap repo, use a PAT with repo scope
34+
# or use GITHUB_TOKEN if homebrew-tap allows it
35+
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}

.goreleaser.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# GoReleaser configuration for agentx
2+
# Documentation: https://goreleaser.com
3+
4+
version: 2
5+
6+
project_name: agentx
7+
8+
before:
9+
hooks:
10+
- go mod tidy
11+
12+
builds:
13+
- id: agentx
14+
main: .
15+
binary: agentx
16+
env:
17+
- CGO_ENABLED=0
18+
goos:
19+
- darwin
20+
- linux
21+
- windows
22+
goarch:
23+
- amd64
24+
- arm64
25+
ldflags:
26+
- -s -w
27+
- -X github.com/agentsdance/agentx/internal/version.Version={{.Version}}
28+
- -X github.com/agentsdance/agentx/internal/version.GitCommit={{.ShortCommit}}
29+
- -X github.com/agentsdance/agentx/internal/version.BuildDate={{.Date}}
30+
31+
archives:
32+
- id: default
33+
formats:
34+
- tar.gz
35+
format_overrides:
36+
- goos: windows
37+
formats:
38+
- zip
39+
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
40+
files:
41+
- LICENSE
42+
- README.md
43+
44+
checksum:
45+
name_template: "checksums.txt"
46+
algorithm: sha256
47+
48+
changelog:
49+
sort: asc
50+
filters:
51+
exclude:
52+
- "^docs:"
53+
- "^test:"
54+
- "^ci:"
55+
- "^chore:"
56+
- Merge pull request
57+
- Merge branch
58+
59+
release:
60+
github:
61+
owner: agentsdance
62+
name: agentx
63+
draft: false
64+
prerelease: auto
65+
name_template: "{{.ProjectName}} v{{.Version}}"
66+
67+
brews:
68+
- name: agentx
69+
repository:
70+
owner: agentsdance
71+
name: agentx
72+
folder: Formula
73+
homepage: "https://github.com/agentsdance/agentx"
74+
description: "CLI tool for managing MCP servers and skills across AI coding agents"
75+
license: "Apache-2.0"
76+
commit_author:
77+
name: goreleaserbot
78+
email: bot@goreleaser.com
79+
install: |
80+
bin.install "agentx"
81+
test: |
82+
system "#{bin}/agentx", "--version"

Formula/agentx.rb

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# typed: false
2+
# frozen_string_literal: true
3+
4+
# This formula is auto-generated by GoReleaser.
5+
# Manual edits will be overwritten on the next release.
6+
#
7+
# To use this formula before it's published to the tap:
8+
# brew install --build-from-source ./Formula/agentx.rb
9+
#
10+
# After publishing, users can install via:
11+
# brew tap agentsdance/tap
12+
# brew install agentx
13+
14+
class Agentx < Formula
15+
desc "CLI tool for managing MCP servers and skills across AI coding agents"
16+
homepage "https://github.com/agentsdance/agentx"
17+
license "Apache-2.0"
18+
version "0.0.1"
19+
20+
on_macos do
21+
on_intel do
22+
url "https://github.com/agentsdance/agentx/releases/download/v#{version}/agentx_#{version}_darwin_amd64.tar.gz"
23+
# sha256 will be auto-populated by GoReleaser
24+
sha256 "PLACEHOLDER_SHA256_DARWIN_AMD64"
25+
end
26+
27+
on_arm do
28+
url "https://github.com/agentsdance/agentx/releases/download/v#{version}/agentx_#{version}_darwin_arm64.tar.gz"
29+
# sha256 will be auto-populated by GoReleaser
30+
sha256 "PLACEHOLDER_SHA256_DARWIN_ARM64"
31+
end
32+
end
33+
34+
on_linux do
35+
on_intel do
36+
url "https://github.com/agentsdance/agentx/releases/download/v#{version}/agentx_#{version}_linux_amd64.tar.gz"
37+
sha256 "PLACEHOLDER_SHA256_LINUX_AMD64"
38+
end
39+
40+
on_arm do
41+
url "https://github.com/agentsdance/agentx/releases/download/v#{version}/agentx_#{version}_linux_arm64.tar.gz"
42+
sha256 "PLACEHOLDER_SHA256_LINUX_ARM64"
43+
end
44+
end
45+
46+
def install
47+
bin.install "agentx"
48+
end
49+
50+
test do
51+
system "#{bin}/agentx", "--version"
52+
end
53+
end

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,20 @@ It provides both a command-line interface and an interactive terminal UI (TUI) f
3838

3939
## Installation
4040

41+
### Homebrew (macOS/Linux)
42+
43+
```bash
44+
# Add the tap
45+
brew tap agentsdance/agentx
46+
47+
# Install agentx
48+
brew install agentx
49+
```
50+
51+
### Download Binary
52+
53+
Download the latest release from [GitHub Releases](https://github.com/agentsdance/agentx/releases).
54+
4155
### Build from Source
4256

4357
```bash

0 commit comments

Comments
 (0)