Releasing
Releases are cut from GitHub Actions in one click. Write user-visible changes under ## [Unreleased] in CHANGELOG.md as you go (Keep a Changelog format, semantic versioning).
Cutting a release
Run Actions → release → Run workflow on main with a version: X.Y.Z, or patch / minor / major to bump the latest tag. Tick dry run to build everything without publishing. The workflow:
- runs
make verify; - runs
tools/relprep, which turns[Unreleased]into[X.Y.Z] - <date>, pins the version in the Composer launcher (composer/custos) and extracts the release notes; then commitsRelease vX.Y.Z, tags it and pushes; - runs goreleaser (
.goreleaser.yaml): archives, bare binaries andSHA256SUMSon the GitHub release, and the cask injanalis/homebrew-tap; - lets Packagist pick up the tag (and pings it when its secrets are set);
- rebuilds and deploys this documentation site, so the changelog and the version in the navigation bar are current.
A failed publish can be retried with Re-run failed jobs; the tag is kept.
To build a snapshot locally:
go run github.com/goreleaser/goreleaser/v2@latest release --snapshot --clean --skip=publishDocumentation site
The site is built with VitePress from docs/ and deployed to GitHub Pages by .github/workflows/docs.yml: on every push to main that touches the docs, the specs or the generators, after each release, and on demand (Run workflow). Pull requests build it without deploying, which catches dead links. The build also fails when make rules-doc output is not committed.
make docs-dev # live preview on http://localhost:5173/custos/
make docs # production build in docs/.vitepress/distOne-time setup
- Create the empty
janalis/homebrew-taprepository and theHOMEBREW_TAP_TOKENsecret: a fine-grained token with Contents: read and write on that repository only. - Submit
https://github.com/janalis/custoson packagist.org; its GitHub hook then updates on every tag. Optionally add thePACKAGIST_USERNAMEandPACKAGIST_TOKENsecrets. - If
mainis protected, let GitHub Actions bypass the protection so the release commit can be pushed. - Settings → Pages → Build and deployment → Source: GitHub Actions.
- Optionally upload
docs/public/og.pngas the repository's social preview (Settings → General → Social preview).
