Katlendar Developer manual GitHub

Releases

How a version is tagged, built and published, and how it reaches the download page and the update check.

Make a release#

  1. Set version in Cargo.toml, as 0.1.0-beta.3 or 0.2.0, and merge it to main.
  2. 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:

SystemRuns onFiles
Linux x86_64ubuntu-22.04katlendar-<v>-linux-x86_64.tar.gz and katlendar_<v>_amd64.deb
Windows x86_64Windowskatlendar-<v>-windows-x86_64.zip
macOSmacOSkatlendar-<v>-macos-universal.dmg
  • Linux builds on Ubuntu 22.04 so the program runs on systems with an older glibc. It runs cargo test --release first. The .deb is made with cargo deb.
  • macOS builds for Apple silicon and for Intel and joins them with lipo into one .app. It is signed ad hoc, not notarised, so macOS warns on first open.

Then the publish job:

  • writes SHA256SUMS.txt for 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.

AddressGoes to
katlendar.date/downloadthe download section of the home page
katlendar.date/download/windowsthe newest release's .zip
katlendar.date/download/macosits .dmg
katlendar.date/download/linuxits .tar.gz
katlendar.date/download/debits .deb
katlendar.date/download/checksumsits 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-update on an older copy finds the new version.

Improve this page on GitHub