Guide to publishing the binary and associated crates.
Development: X.Y.Z-dev ← master always has a -dev suffix
Nightly: X.Y.Z-nightly.YYYYMMDD ← CI-stamped at build time, never committed
Release: X.Y.Z ← scripts/set-version.sh X.Y.Z, commit & tag
Post-release: X.Y+1.0-dev ← scripts/set-version.sh X.Y+1.0-dev, commit & push
Crates must be published in dependency order:
distant-coredistant-dockerdistant-hostdistant-sshdistant(root binary)
Edit docs/CHANGELOG.md:
- Change
[Unreleased]to the release version and date:[X.Y.Z] - YYYY-MM-DD - Add a new
[Unreleased]header above it - At the bottom, add a comparison link for the new version
- Update the
[Unreleased]comparison link
scripts/set-version.sh X.Y.ZThis updates [workspace.package] version and all [workspace.dependencies]
version pins in the root Cargo.toml.
scripts/dry-run-publish.shRuns cargo publish --dry-run for each crate in dependency order. Verifies
that all crates are publishable.
git add -A
git commit -m "Release vX.Y.Z"
git tag vX.Y.Z
git push && git push --tagsPushing the tag triggers the release CI workflow, which builds binaries for all platforms and creates a GitHub release with the changelog entry.
cargo publish --all-features -p distant-core
cargo publish --all-features -p distant-docker
cargo publish --all-features -p distant-host
cargo publish --all-features -p distant-ssh
cargo publish --all-featuresWait a few seconds between each crate for crates.io indexing.
scripts/set-version.sh X.Y+1.0-dev
git add -A
git commit -m "Bump to X.Y+1.0-dev"
git pushFor alpha/beta/rc releases, use a prerelease suffix:
scripts/set-version.sh 0.22.0-alpha.1
git commit -am "Release v0.22.0-alpha.1"
git tag v0.22.0-alpha.1
git push && git push --tagsThe release workflow marks tags with prerelease suffixes as pre-releases on GitHub.
A cron job runs daily at midnight UTC (.github/workflows/nightly.yml).
If master has new commits since the last nightly, it force-updates the
nightly tag, which triggers the release workflow. The version is stamped as
X.Y.Z-nightly.YYYYMMDD in the built binaries (never committed to the repo).
The scripts/check-publish-version.sh script prevents accidental publishing
of -dev or other prerelease versions. It reads the workspace version and
aborts if it contains a prerelease suffix.
scripts/dry-run-publish.sh runs this guard automatically before attempting
the dry run.