Releases
How a version is tagged, built and published, and how it reaches the download page and the update check.
Make a release#
- Set
versioninCargo.toml, as0.1.0-beta.3or0.2.0, and merge it tomain. - Tag that commit and push the tag:
git tag -a v0.2.0 -m "Katlendar 0.2.0"
git push origin v0.2.0
The tag must be v plus the version in Cargo.toml. If they differ, the release workflow stops with an error before building.
A tag with a - part, such as v0.2.0-beta.1 or v1.0.0-rc.1, is published as a pre-release.
What the workflow builds#
.github/workflows/release.yml builds on three systems at once:
| System | Runs on | Files |
|---|---|---|
| Linux x86_64 | ubuntu-22.04 | katlendar-<v>-linux-x86_64.tar.gz and katlendar_<v>_amd64.deb |
| Windows x86_64 | Windows | katlendar-<v>-windows-x86_64.zip |
| macOS | macOS | katlendar-<v>-macos-universal.dmg |
- Linux builds on Ubuntu 22.04 so the program runs on systems with an older glibc. It runs
cargo test --releasefirst. The.debis made withcargo deb. - macOS builds for Apple silicon and for Intel and joins them with
lipointo one.app. It is signed ad hoc, not notarised, so macOS warns on first open.
Then the publish job:
- writes
SHA256SUMS.txtfor all the files; - makes the GitHub release "Katlendar v…" with the files and notes generated from the merged pull requests.
You can run the workflow by hand from the Actions tab to try the builds. That run only uploads the files as workflow artifacts and publishes nothing.
How people get it#
Nothing on the site needs to change for a release. The site's Worker reads GitHub's release list and keeps it for ten minutes.
| Address | Goes to |
|---|---|
katlendar.date/download | the download section of the home page |
katlendar.date/download/windows | the newest release's .zip |
katlendar.date/download/macos | its .dmg |
katlendar.date/download/linux | its .tar.gz |
katlendar.date/download/deb | its .deb |
katlendar.date/download/checksums | its SHA256SUMS.txt |
"Newest" is the newest release that is not a draft, pre-releases included. When that release has no such file, the address goes to its release page.
releases.json#
https://katlendar.date/releases.json is the list the app's update check reads. It is GitHub's release list with only the fields the app and the site use:
tag_name,name,html_url,draft,prerelease,published_at;- for each file:
name,size,browser_download_url.
The Worker keeps it for ten minutes, and keeps the last good list for a day to answer with when GitHub refuses. A GITHUB_TOKEN secret on the Worker raises GitHub's limit from 60 to 5,000 asks an hour.
The app picks the highest version above its own. A stable copy is offered only stable releases; a beta is offered betas too. See The update check.
Check a release#
After the workflow finishes:
- the release page lists the four packages and
SHA256SUMS.txt; - each
/download/…address above downloads the new file; katlendar --check-updateon an older copy finds the new version.