GoReleaser GoReleaser is a release automation tool for Go projects, the goal is to simplify the build, release and publish steps while providing variant customization options for all steps. https://goreleaser.com/
Difficulties - There are no versions What if it would kick me straight into dependency hell? - There is no changelog There was fixed some critical security problems or only new features was added, or maybe it was just caused by docs update? Should I update? - It is hard to install Build that stuff from sources. What? No way.
Keep a ChangeLog https://keepachangelog.com/en/1.0.0/ What is a changelog? A changelog is a file which contains a curated, chronologically ordered list of notable changes for each version of a project. Why keep a changelog? To make it easier for users and contributors to see precisely what notable changes have been made between each release (or version) of the project. Who needs a changelog? People do. Whether consumers or developers, the end users of software are human beings who care about what's in the software. When the software changes, people want to know why and how.
Conventional Commits https://www.conventionalcommits.org/ A specification for adding human and machine readable meaning to commit messages [optional scope]: [optional body] [optional footer]
Which one? • rpm, deb packages • docker image • homebrew formula • binary executables A B C • binary executables • source code • source code* * build that shit by yourself
Version Info package main import "fmt" var ( version = "dev" commit = "none" date = "unknown" ) func main() { fmt.Printf("%v, commit %v, built at %v", version, commit, date) }
Template variables Key Description .ProjectName the project name .Version the version being released (v prefix stripped) .Tag the current git tag .ShortCommit the git commit short hash .FullCommit the git commit full hash .Commit the git commit hash (deprecated) .GitURL the git remote url .Major the major part of the version .Minor the minor part of the version .Patch the patch part of the version .Env a map with system’s environment variables .Date current UTC date in RFC3339 format .Timestamp current UTC time in Unix format