Skip to content

build: fix module path and add release pipeline#6

Merged
chocks merged 10 commits intomainfrom
build/go-install-support
Apr 11, 2026
Merged

build: fix module path and add release pipeline#6
chocks merged 10 commits intomainfrom
build/go-install-support

Conversation

@chocks
Copy link
Copy Markdown
Owner

@chocks chocks commented Apr 11, 2026

Summary

  • Fix Go module path from github.com/agentctl/agentctlgithub.com/chocks/agentctl so go install works against the real repo
  • Add -ldflags version injection — agentctl version now reports the git tag/SHA instead of a hardcoded string
  • Add GoReleaser config for cross-platform binaries (linux/darwin/windows, amd64/arm64)
  • Add GitHub Actions release workflow — push a v* tag to cut a release (restricted to tags on main)
  • Add CONTRIBUTING.md covering setup, workflow, code guidelines, schema contract rules, and PR checklist

How to release

git tag v0.1.0
git push origin v0.1.0

Test plan

  • go build and go test ./... pass with new module path
  • bin/agentctl version prints injected version
  • After merge, verify go install github.com/chocks/agentctl/cmd/agentctl@latest works
  • Tag v0.1.0 and confirm GitHub Actions release produces binaries
  • Verify release workflow rejects tags not on main

🤖 Generated with Claude Code

chocks and others added 10 commits April 11, 2026 07:49
- Update module path from github.com/agentctl/agentctl to
  github.com/chocks/agentctl so go install works
- Add ldflags version injection (replaces hardcoded v0.1.0)
- Update Makefile with proper build and install targets
- Add GoReleaser config for cross-platform binary releases
- Add GitHub Actions release workflow triggered by v* tags

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Update module path in hook.go, mcp.go, and related test/doc files
added on main. Replace agentctlVersion const with ldflags var.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Covers setup, workflow, code guidelines, schema contract rules,
and PR checklist. Aligns with existing CLAUDE.md and AGENTS.md
conventions without duplicating them.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add a merge-base check that fails the release if the tagged commit
is not an ancestor of main, preventing accidental releases from
feature branches.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Runs golangci-lint, go test -race, and go build on every PR
targeting main and on pushes to main.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The repo's .golangci.yml uses v2 syntax (version: "2", linters.default).
golangci-lint-action@v6 installs v1.x which rejects this config.
Upgrade to @v7 which installs golangci-lint v2.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace exclude-use-default (v1) with exclude-default-patterns (v2).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Remove invalid issues.exclude-default-patterns from .golangci.yml
- Remove unused mcpInitializeParams type caught by lint
- Add make ci target (fmt + lint + test + build)
- Simplify CI workflow to just `make ci`

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
CI now runs make install-tools + make ci, matching the local
developer workflow exactly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Avoid surprise breaks from upstream changes by pinning to a
known stable version.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@chocks chocks merged commit dafaf5e into main Apr 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant