ditointernet / go-dito

MIT License
6 stars 0 forks source link

Release Workflow

Go Dito

Go Dito is a repository of utilitary packages written in Go, designed to improve development experience of Dito's squads.

Internal structure

This repository is designed as a Monorepo. Each root's folder (except .github/) represents an individual and independent package.

Every package is automatically versioned using Semantic Release default rules. Every semantic commit pushed to master branch, that updates a package codebase, will generate a new release version for its package. If a commit does not touches the code base of a package, its version must not be increased. A single commit can increase version of multiple packages when it touches them all.

Also, this repository uses a new feature of Go 1.18 called Workspaces.

How to use a package

go get github.com/ditointernet/go-dito/<package-name>

How to contribute with new packages

Package Best Practices

Frequently Asked Questions

What is the format of a semantic commit?

<type>(<scope>): <short summary>

Type must be one of the following:

Commits with a footer message containing the phrase BREAKING CHANGE: indicates a Major release.

You can read more about this here.

Notice that, if your changes increases the Major version of your package, you MUST update package's go.mod properly. For instance, if there is a BREAKING CHANGE to package foo, that increases its version to 2.0.0, you MUST update foo/go.mod with:

module github.com/ditointernet/go-dito/foo -> module github.com/ditointernet/go-dito/foo/v2

This need is required by Go design.

What happens if my Pull Request does not have any semantic commit?

No version will be created.

How can I create release candidates?

Just merge your changes into beta branch.