Merge pull request 'Release by itself at every merge' (#38) from ci/semantic-release into main
All checks were successful
release / release (push) Successful in 38s
release / image (push) Successful in 3m44s

This commit is contained in:
squid 2026-11-16 12:09:16 +00:00
commit 3490849837

View file

@ -404,6 +404,19 @@ What it does today: sign in (and create the first account of a new server), brow
More commands, all run in `web/`: `npm test`, `npm run build`, and `npm run gen:api`, which rebuilds `src/api/schema.d.ts` from the OpenAPI spec (it fetches the generator with `npx`, so it needs the network once). `npm run build` writes to `internal/webui/dist` (git-ignored), not to `web/dist`.
## Releases
Every merge into `main` can make a release, by itself (`.forgejo/workflows/release.yml`, [semantic-release](https://semantic-release.gitbook.io)). The next version comes from the messages of the commits since the last one, written as [Conventional Commits](https://www.conventionalcommits.org):
| Commit | Release |
|---|---|
| `fix: ...`, `perf: ...` | patch (0.2.0 to 0.2.1) |
| `feat: ...` | minor (0.2.0 to 0.3.0) |
| `feat!: ...`, or `BREAKING CHANGE:` in the body | major (0.2.0 to 1.0.0) |
| `docs:`, `test:`, `chore:`, `ci:`, `style:` | none by themselves |
A release adds its entry to [CHANGELOG.md](CHANGELOG.md), tags the commit (`v0.3.0`), makes the release on the forge, and the image is built from the tag and pushed to `git.kmalloc.org/squid/sonda` as `0.3.0`, `0.3` and `latest`. The version is inside the binary: `GET /version` and the User-Agent of the providers say it (a build that no release made says `dev`). The commit that writes `CHANGELOG.md` says `[skip ci]`. The runner has no Docker, so the image is built with [kaniko](https://github.com/GoogleContainerTools/kaniko). The workflow needs the secret `FORGEJO_TOKEN`: a token of the owner with the scopes `write:repository` and `write:package`.
## Development
```bash