Replace the 326-line semantic-release/npm workflow with release-plz, which handles the whole chain the old one only half did: - versioning and CHANGELOG from the conventional commits already in use - a `chore: release vX.Y.Z` PR as the gate; merging it tags and releases - publishes both crates to crates.io in dependency order, waiting for the index between them (RELEASE.md used to ask you to do this by hand) - release-plz.toml keeps the two crates on one version, one tag, one changelog Binaries now cover six targets instead of four. Linux switches from gnu to musl so the downloads are statically linked and stop caring about the host's glibc version; linux-aarch64 and windows-aarch64 are new. Archives carry sha256 checksums plus README and LICENSE. CI drops twelve hand-rolled actions/cache steps for Swatinem/rust-cache.
3.1 KiB
3.1 KiB
Releasing
Releases are automated by release-plz. You do not run
cargo publish, edit versions, write changelog entries, or push tags by hand.
How it works
- Merge a PR to
masterusing conventional commits (feat:,fix:,perf:,refactor:,docs:,chore:, or a!/BREAKING CHANGE:footer for a major bump). .github/workflows/release.ymlopens or updates achore: release vX.Y.ZPR. It contains the semver bump in[workspace.package], the refreshedCargo.lock, and the generatedCHANGELOG.mdentry. Review it like any other PR.- Merging that PR releases:
- tags
vX.Y.Zand creates the GitHub release with the changelog as its notes, - publishes
soulseek-rs-libthensoulseek-rsto crates.io (dependency order, waiting for the index between them), - builds and attaches binaries with
.sha256checksums for six targets:Archive Notes soulseek-rs-vX.Y.Z-x86_64-unknown-linux-musl.tar.gzstatic, any glibc soulseek-rs-vX.Y.Z-aarch64-unknown-linux-musl.tar.gzstatic, any glibc soulseek-rs-vX.Y.Z-x86_64-apple-darwin.tar.gzIntel Mac soulseek-rs-vX.Y.Z-aarch64-apple-darwin.tar.gzApple Silicon soulseek-rs-vX.Y.Z-x86_64-pc-windows-msvc.zipsoulseek-rs-vX.Y.Z-aarch64-pc-windows-msvc.zip
- tags
Both crates always share one version, one tag, and one changelog — see release-plz.toml.
One-time repository setup
- Settings → Actions → General → Workflow permissions: enable Allow GitHub Actions to create and approve pull requests. Without it the release PR is never opened.
- Settings → Secrets and variables → Actions: add
CARGO_REGISTRY_TOKEN, a crates.io token scoped topublish-newandpublish-update. Without it the tag and GitHub release still happen, but the crates.io publish fails.
Notes
- A merge with no releasable commits (only
docs:/chore:/test:) opens no release PR. That is intended. - The release PR does not run CI: GitHub does not trigger workflows for PRs opened with
GITHUB_TOKEN. It only touchesCargo.toml,Cargo.lock, andCHANGELOG.md; CI already ran on the commits it is releasing. - If one target's build fails, the other five still upload (
fail-fast: false). Re-run just that matrix job from the Actions UI. - To skip a release for a commit that would otherwise trigger one, use a
chore:type.
Installing a release
cargo install soulseek-rs
Or download an archive from the releases page,
verify it against the adjacent .sha256, and extract the binary.
Using the library
[dependencies]
soulseek-rs-lib = "5"