Make a release

Set the version in the workspace's Cargo.toml, in both places: the workspace version and the = versions of bob and pv under [workspace.dependencies]. Merge that to main, then push a matching tag:

git tag v1.2.3
git push origin v1.2.3

CI checks that the tag matches the version in Cargo.toml and fails the build if not. It creates the GitHub Release itself and builds on a runner for each platform (ubuntu-24.04, ubuntu-24.04-arm, macos-15, which also cross-builds the x86_64 Mac build, and windows-2022), attaching a bobview-<arch>-<os>.tar.gz for each Linux and macOS build, such as bobview-x86_64-linux.tar.gz and bobview-aarch64-macos.tar.gz, and bobview-x86_64-windows.zip for Windows.

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 archive carries THIRD_PARTY_LICENSES.txt, generated by scripts/third-party-licenses.py. install.sh downloads the latest release for the machine it runs on.

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

Publish to crates.io

The workspace publishes five crates: bobview, bobview-server, the libraries they use, bobview-bob and bobview-pv, and bobview-testioc, which pv's tests use (the names bob and pv were taken; the code still calls them bob, pv and testioc). Check them first with

cargo publish --workspace --dry-run

which packages each crate and builds it as crates.io will.

The first time, publish by hand: log in to crates.io with GitHub, create an API token with the publish scope, then

cargo login
cargo publish --workspace

Cargo publishes them in dependency order. After that, CI can publish each release itself with trusted publishing, which needs no stored token:

  1. On crates.io, in each crate's Settings → Trusted Publishing, add the repository gilesknap/bobview and the workflow ci.yml.
  2. In the repository's Settings → Secrets and variables → Actions → Variables, set PUBLISH_CRATES to true.

The publish job then runs after the GitHub Release is made for each tag. A version can be published to crates.io only once, so fix a bad release with a new version.

archiveview

Trend windows embed archiveview from crates.io, and archiveview depends on the crates.io bobview-pv. The root Cargo.toml patches that to crates/pv, so both use one PvManager. That holds only while archiveview's bobview-pv requirement matches this workspace's version: if pv goes to a new major version, or its API that archiveview uses changes, release archiveview against it first. Then raise the archiveview version in the root Cargo.toml, run cargo update -p archiveview -p archiveview-archiver, and check cargo tree -i bobview-pv shows a single bobview-pv before tagging.