Skip to content

Go program designed to automate semantic versioning of Git repository by analyzing their formatted commit history and tagging them with the right semver.

Notifications You must be signed in to change notification settings

s0ders/go-semver-release

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mentioned in Awesome Go GitHub Tag GitHub go.mod Go version Go Reference GitHub Actions Workflow Status Go Report Card Codecov GitHub License

Go Semver Release

Go program designed to automate versioning of Git repository by analyzing their formatted commit history and tagging them with the right SemVer number.

Motivation

This project was built to create a lightweight and simple tool to automate the semantic versioning on your Git repository in a language and CI agnostic way by following strictly the Semantic Versioning convention.

Following the UNIX philosophy of "make each program do one thing well", it only handles publishing SemVer tags to your Git repository, no package publishing or any other features.

All you need to have is an initialized Git repository, a release branch (e.g., main) and a formatted commit history on that branch following the Conventional Commit specification. Many IDEs support plugins to help in formatting your commit messages (e.g., VSCode, IntelliJ).

Important

go-semver-release can only read annotated Git tags. If at some point you need to manually add a SemVer tag your repository, make sure it is annotated, otherwise the program will not be able to detect it.

Install

If Go is installed on your machine, you can install from source:

$ go install github.com/s0ders/go-semver-release/v4@latest
$ go-semver-release --help

For cross-platform compatibility, you can use the generated Docker image:

$ docker pull s0ders/go-semver-release:latest
$ docker run --rm s0ders/go-semver-release --help

Usage

Documentation about the CLI usage can be found here.

CI workflow examples

This tool is voluntarily agnostic of which CI tool is used with it. Examples of workflows with various CI tools can be found here.

How is this tool different from X ?

Other tools exist to version software using semantic versions such as semantic-release. Go Semver Release focuses on versioning only, no package publishing, release log generation or other features.

If you want a simple tool that handle the generation of the next semantic version tag for your project, you are at the right place. This allows the program to work with minimal dependencies and to avoid requiring the use of secret tokens on user-end.

As stated above, Go Semver Release is agnostic of which CI tool you use or which branch you use it on. You define the configuration using flags, environment variables or configurations file however you please on your CI for maximized modularity.

About

Go program designed to automate semantic versioning of Git repository by analyzing their formatted commit history and tagging them with the right semver.

Topics

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published