Make a release

Push a tag such as v0.1.0:

git tag v0.1.0
git push origin v0.1.0

CI creates the GitHub Release itself and builds with the version taken from the tag, so Cargo.toml needs no bump. It builds on native runners for each platform (ubuntu-24.04, ubuntu-24.04-arm and macOS) and attaches an archiveview-<arch>-<os>.tar.gz for each, such as archiveview-x86_64-linux.tar.gz and archiveview-aarch64-linux.tar.gz.

The Linux builds use cargo zigbuild to link against glibc 2.28, so they run on RHEL 8+, Ubuntu 20.04+ and Debian 10+. Each tarball carries THIRD_PARTY_LICENSES.txt, generated by scripts/third-party-licenses.py. install.sh downloads the latest release for the machine it runs on.

Publish to crates.io

The same tag publishes archiveview-archiver, archiveview-mockarchiver and archiveview to crates.io at the tag's version, once the check and build jobs pass. The publish job uses crates.io trusted publishing, so no token is stored in GitHub.

Each crate on crates.io has a trusted publisher: GitHub, owner gilesknap, repository archiveview, workflow ci.yml and environment release.

If the job fails after publishing some of the crates, a re-run fails on the version already published. Publish the rest by hand instead, from a checkout of the tag with an API token from https://crates.io/settings/tokens, after setting the tag's version as CI does (Cargo.toml is not bumped in the repository):

git checkout v0.2.0
V=0.2.0 perl -0pi -e 's/^version = .*$/version = "$ENV{V}"/m;' \
    -e 's/^(archiver = \{.*version = ")[^"]*/$1$ENV{V}/m' Cargo.toml
cargo login
cargo publish -p archiveview --allow-dirty   # each crate not yet published
git checkout Cargo.toml Cargo.lock

A new crate added to the workspace is published by hand the same way the first time, since trusted publishing can only be set up for a crate that already exists; then add its trusted publisher as above.

Docs

The tag also publishes a copy of these docs at https://gilesknap.github.io/archiveview/<tag>/, which the version menu in the docs' top bar then lists beside main.