Skip to content

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.

  • develop receives the work: each change has its own branch, merged into develop by a pull request.
  • main only moves to release: a pull request from develop into main, merged with a merge commit. A documentation fix that must go online at once can also go straight into main.

.github/workflows/release.yml:

  1. Checks: the jobs of ci.yml (Go, interface, Docker build).
  2. Release: semantic-release looks at the commits since the last version tag. Nothing to release (only docs, ci, build, chore, test, refactor, style commits): it stops there. Otherwise it writes the notes at the top of CHANGELOG.md, commits them as chore(release): x.y.z [skip ci], tags vx.y.z and creates a draft GitHub release with the same notes.
  3. Sync develop: main is merged back into develop, so that develop has the release commit.
  4. Binaries: GoReleaser (.goreleaser.yaml) builds the archives from the tag, Linux only, amd64 and arm64, with the license, the changelog and compose.yaml, plus checksums.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).
  5. Docker image ghcr.io/sokteam/fret for linux/amd64 and linux/arm64, tagged x.y.z, x.y and latest.
  6. 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.

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.

  1. CI is green on develop.
  2. The documentation describes what changes; screenshots in docs/screenshots/ show the current interface.
  3. The commit messages say what users get: they become the release notes.

.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.

Built with Kiln