
goreleaser
by sgaunet
A curated collection of specialized Claude Code plugins designed to enhance your development workflow with intelligent agents, skills, and commands.
SKILL.md
name: goreleaser description: Initialize or update GoReleaser configuration for automated Go releases with multi-architecture Docker builds, binary distribution, and Homebrew publishing
GoReleaser Setup Skill
Automate Go project releases with cross-platform binaries, multi-architecture Docker images, and package distribution.
Overview
GoReleaser handles complete release automation for Go projects:
- Building binaries for multiple OS/architectures
- Creating multi-architecture Docker images and manifests
- Publishing to GitHub/GitLab releases
- Generating Homebrew formulas
- Creating automated changelogs
- Calculating checksums and signatures
This skill provides templates and guidance for professional release automation.
Prerequisites
- GoReleaser installed:
brew install goreleaseror see https://goreleaser.com/install/ - Docker with buildx: For multi-architecture builds (
docker buildx version) - Git tags: GoReleaser works with semantic versioning tags (e.g.,
v1.0.0) - GitHub/GitLab token: For release creation and Homebrew tap updates
- Project structure: Go module with
cmd/directory (or adjustdirfield)
Quick Start
Step 1: Analyze Project Structure
Understand your project:
# Check for existing configuration
ls -la .goreleaser.yml .goreleaser.yaml
# Identify build entry point
find . -name "main.go" -type f
# Verify Go module
cat go.mod
Step 2: Copy Template Files
Copy templates from assets/ directory:
# Copy GoReleaser config
cp assets/.goreleaser.yml .
# Copy Dockerfile
cp assets/Dockerfile .
# Copy resources (for Docker)
mkdir -p resources/etc
cp assets/resources/etc/passwd resources/etc/
Step 3: Customize Configuration
Update .goreleaser.yml with project-specific values:
- Project name: Replace
PROJECT_NAMEwith actual name - Build configuration:
- Set
dirif main.go is not incmd/ - Adjust
ldflagsfor version injection - Configure target OS/architectures
- Set
- Docker registry: Update image templates
- GitHub:
ghcr.io/OWNER/PROJECT - GitLab:
registry.gitlab.com/OWNER/PROJECT - Docker Hub:
docker.io/OWNER/PROJECT
- GitHub:
- Homebrew tap (optional): Configure repository and token
Step 4: Update Dockerfile
Customize the Dockerfile:
- Replace
PROJECT_BINARYwith actual binary name - Adjust user name in both Dockerfile and
resources/etc/passwd - Add any additional runtime dependencies
Step 5: Set Up CI/CD Integration
Add environment variables to CI/CD:
# GitHub Actions
GITHUB_TOKEN # Automatic in GitHub Actions
HOMEBREW_TAP_TOKEN # If publishing to Homebrew
# GitLab CI
GITLAB_TOKEN # Automatic in GitLab CI
HOMEBREW_TAP_TOKEN # If publishing to Homebrew
Step 6: Test Configuration
Validate before tagging:
# Check configuration
goreleaser check
# Create snapshot build (no release)
goreleaser build --snapshot --clean
# Test full release process
goreleaser release --snapshot --clean --skip=publish
Step 7: Create Release
When ready:
# Create and push tag
git tag -a v1.0.0 -m "Release v1.0.0"
git push origin v1.0.0
# Run GoReleaser (usually in CI/CD)
goreleaser release --clean
Template Files & Patterns
Templates in assets/ directory:
.goreleaser.yml- Complete config with multi-arch Docker, Homebrew, archivesDockerfile- Optimized multi-stage Docker buildresources/etc/passwd- Non-root container user config
For simpler patterns (binary-only, Docker-only, private registries), see REFERENCE.md.
Task Runner Integration
Integrate with Taskfile.yml:
version: '3'
tasks:
release:check:
desc: Validate GoReleaser config
cmds:
- goreleaser check
release:snapshot:
desc: Test release build
cmds:
- goreleaser release --snapshot --clean --skip=publish
release:
desc: Create production release
cmds:
- goreleaser release --clean
Expected Output
After using this skill, the project will have:
- ✓
.goreleaser.ymlconfigured for the project - ✓
Dockerfilefor multi-architecture builds - ✓
resources/etc/passwdfor non-root container user - ✓ CI/CD pipeline ready for automated releases
- ✓ Tested snapshot builds
Users can then create releases by simply pushing Git tags.
Additional Documentation
- Configuration patterns and examples: See REFERENCE.md
- Troubleshooting common issues: See TROUBLESHOOTING.md
- Template files: Available in
assets/directory
Best Practices
- Semantic Versioning: Use
v1.2.3format for tags - Conventional Commits: Enables automatic changelog generation
- Test Snapshots: Always test with
--snapshotbefore tagging - Multi-arch Testing: Verify builds work on target architectures
- Secret Management: Never commit tokens, use CI/CD secrets
Resources
- Official docs: https://goreleaser.com
- Example configs: https://github.com/goreleaser/goreleaser/tree/main/.github/workflows
- Docker buildx: https://docs.docker.com/buildx/working-with-buildx/
- Conventional commits: https://www.conventionalcommits.org/
Score
Total Score
Based on repository quality metrics
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
1ヶ月以内に更新
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
Reviews
Reviews coming soon

