Make a release
Publish a new version of Cupid on GitHub, with binary archives for Linux, macOS and Windows, the source distribution and the changelog. The maintainer makes releases.
Prerequisites
- mise, which installs the pinned git-cliff and
jq from
mise.toml - zsh, which the release task is written in, and GNU sed (on macOS,
install
gnu-sedand put it first on the path) - git and jj, with the repository a jj repository colocated with git
- gh, signed in to GitHub with push access to the repository
- every change to release merged into
main, with CI green
Steps
1. Open the release pull request
mise run release-pr
It reads the commits on main since the last release tag and picks the
next version from them (see Versions). It sets that version
in project() in meson.build, adds the new version's section to the
top of CHANGELOG.md with git-cliff, leaving
the sections of past releases as they are, and opens a pull request titled
chore(release): VERSION. If no commit since the last release is a
feat, fix, perf or breaking change, it says so and does nothing.
2. Review it
Edit CHANGELOG.md in the pull request if an entry needs rewording. To
choose a different version, such as 1.0.0, change it in meson.build,
in the CHANGELOG.md heading and its link reference at the end of the
file, and in the commit description, all the same.
3. Merge it
When ci-ok passes, merge the pull request with a rebase merge.
CI's release job sees the release commit at the head of main. It
publishes a GitHub release, which creates the tag vVERSION, with:
cupid-VERSION-TARGET.tar.gzforx86_64-linux,aarch64-linux,x86_64-macosandaarch64-macos: the archives that CI built and tested, nothing rebuiltcupid-VERSION-x86_64-windows.zip, likewise built and tested by CIcupid-VERSION.tar.gz, the source distribution thatmeson distmakesSHA256SUMSfor all of them- the version's section of
CHANGELOG.mdas the release notes
Once the release is published, the pages job deploys the website,
built from the same commit, to https://cupid-haskell.org/.
The site therefore documents the latest release, not main.
4. Verify it
gh release verify vVERSION
gh attestation verify cupid-VERSION-x86_64-linux.tar.gz --repo andreabedini/cupid --signer-workflow andreabedini/cupid/.github/workflows/ci.yml
The second command checks the build attestation that the release job
records for every file in dist/ with actions/attest-build-provenance.
It is the check Install a release
gives users, and the one the install scripts run when gh is signed
in, so the signer workflow must stay ci.yml on main or that page
and the scripts need updating.
Releases are immutable: a published version cannot change. If a
release is wrong, fix it and make a new one. If the release job fails
before it publishes, rerun the failed jobs; it continues the draft
release. If only pages fails, rerun it: it deploys the same site.
Versions
Versions follow Semantic Versioning, A.B.C.
The release task works out the next one from the commit messages, and
CI checks that they follow Conventional
Commits:
| Since the last release | While 0.x | From 1.0.0 |
|---|---|---|
a breaking change (type!:) | 0.B+1.0 | A+1.0.0 |
a feat | 0.B+1.0 | A.B+1.0 |
only fix and perf | 0.B.C+1 | A.B.C+1 |
Nothing leaves 0.x by itself: 1.0.0 is set by hand in step 2.
cliff.toml holds these rules and the grouping of the changelog.