This project uses goreleaser and svu for automated releases.
- goreleaser: Handles building binaries for multiple platforms, creating archives, checksums, Docker images, and GitHub releases
- svu: Semantic version utility that determines the next version based on git tags and conventional commits
-
Create and push a tag manually:
git tag -a v1.0.0 -m "Release v1.0.0" git push origin v1.0.0 -
The build workflow will automatically trigger and:
- Build binaries for Linux, macOS, Windows, and FreeBSD (amd64 and arm64)
- Create archives and checksums
- Build multi-arch Docker images
- Create a GitHub release with auto-generated release notes
-
Go to Actions → Tag Version workflow
-
Click "Run workflow"
-
Select version type:
- auto: Determines version automatically based on conventional commits
- major: Bumps major version (e.g., 1.0.0 → 2.0.0)
- minor: Bumps minor version (e.g., 1.0.0 → 1.1.0)
- patch: Bumps patch version (e.g., 1.0.0 → 1.0.1)
-
The workflow will:
- Calculate the next version using svu
- Create and push the tag
- Automatically trigger the build workflow
When using auto versioning, svu determines the version bump based on commit messages:
feat:orfeat(scope):→ Minor version bumpfix:orfix(scope):→ Patch version bumpBREAKING CHANGE:or!→ Major version bump
Examples:
feat: add support for IPv6 scanning
fix: resolve timeout issue in port scanner
feat!: redesign configuration file format (breaking change)
Each release includes:
- Binaries: For multiple platforms and architectures
- Archives:
.tar.gz(Unix) and.zip(Windows) - Checksums: SHA256 checksums in
checksums.txt - Docker Images: Multi-arch images pushed to Docker Hub
amine7536/reverse-scanamine7536/reverse-scan:latestamine7536/reverse-scan:v1.0.0
Test the goreleaser configuration locally:
# Install goreleaser
go install github.com/goreleaser/goreleaser/v2@latest
# Check configuration
goreleaser check
# Build snapshot (without publishing)
goreleaser release --snapshot --clean --skip=publish
# Test Docker build
goreleaser release --snapshot --clean --skip=publish,signThe version is injected at build time using ldflags. When building manually:
go build -ldflags="-X main.Version=v1.0.0"When using goreleaser, the version is automatically injected from the git tag.
Docker images are built for both amd64 and arm64 architectures and published to Docker Hub:
# Pull latest
docker pull amine7536/reverse-scan:latest
# Pull specific version
docker pull amine7536/reverse-scan:v1.0.0Changelogs are automatically generated from commit messages and organized by type:
- New Features
- Bug Fixes
- Enhancements
- Documentation
- Other Changes
Commits starting with docs:, test:, chore:, or merge commits are excluded from the changelog.