Releasing
Fret releases itself, as S.O.K does: every merge into main may publish a version. Nobody chooses the
number or writes the notes: semantic-release reads the commits
merged since the last version.
Branches
Section titled “Branches”developreceives the work: each change has its own branch, merged intodevelopby a pull request.mainonly moves to release: a pull request fromdevelopintomain, merged with a merge commit. A documentation fix that must go online at once can also go straight intomain.
What a merge into main triggers
Section titled “What a merge into main triggers”.github/workflows/release.yml:
- Checks: the jobs of
ci.yml(Go, interface, Docker build). - Release: semantic-release looks at the commits since the last version tag. Nothing to release
(only
docs,ci,build,chore,test,refactor,stylecommits): it stops there. Otherwise it writes the notes at the top ofCHANGELOG.md, commits them aschore(release): x.y.z [skip ci], tagsvx.y.zand creates a draft GitHub release with the same notes. - Sync develop:
mainis merged back intodevelop, so thatdevelophas the release commit. - Binaries: GoReleaser (
.goreleaser.yaml) builds the archives from the tag, Linux only, amd64 and arm64, with the license, the changelog andcompose.yaml, pluschecksums.txt; they are attached to the draft. macOS and Windows get no binary: Docker serves them, and the code still builds there from source (make build). - Docker image
ghcr.io/sokteam/fretforlinux/amd64andlinux/arm64, taggedx.y.z,x.yandlatest. - Publish: once the archives and the image are there, the draft gets a line about the image and is published as the latest release; the documentation is rebuilt so that its changelog page shows the version. If a build fails, the release stays a draft.
Versions
Section titled “Versions”The version follows semantic versioning, from the commit types (see Commits):
| Commits since the last version | Version |
|---|---|
fix: or perf: |
patch (1.0.1) |
feat: |
minor (1.1.0) |
! after the type, or a BREAKING CHANGE: footer |
major (2.0.0) |
| Only other types | No release |
A breaking change is one that needs action from users (configuration, API, data); its footer says what to do.
The version is set at build time (-X main.version=…); fret version prints it.
Before merging develop into main
Section titled “Before merging develop into main”- CI is green on
develop. - The documentation describes what changes; screenshots in
docs/screenshots/show the current interface. - The commit messages say what users get: they become the release notes.
The documentation site
Section titled “The documentation site”.github/workflows/docs.yml builds this site with Kiln’s reusable workflow and publishes it on GitHub
Pages at every push to main, and again after each release. The repository must have Settings ›
Pages › Source set to GitHub Actions.