Repository navigation
chore: release only on source changes - #18
Merged
Merged
Conversation
release-plz only counts commits that touch files included in the package, so Cargo.toml now lists what a release is made of: src, the manifest, the lockfile and the license. readme = false keeps the README out (the archives copy it from the repo); a commit that only touches workflows, dev scripts, scanner configs, tests or docs opens no release PR and bumps no version. 0.1.2 was such a release. release-plz also runs git_only: a foreign crate named pgen exists on crates.io, and without it release-plz compared the manifest against that crate and produced a bump on every run, whatever the commits.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stops the pipeline-only releases (0.1.2 shipped a binary identical to 0.1.1).
includelist in Cargo.toml: release-plz only counts commits that touch files included in the package. The package is nowsrc/**, the manifest, the lockfile and the license, withreadme = falseso cargo does not add the README on its own (the release archives copy it from the repo indev/package.sh). A commit that only touches workflows,dev/, scanner configs, tests or docs opens no release PR and bumps nothing.git_only = truein release-plz.toml: a foreign crate namedpgenexists on crates.io (a passphrase generator). Withoutgit_only, release-plz downloaded it as "the released version", found our Cargo.toml different, and produced a synthetic "update dependencies" commit that bumped the version on every run, whatever the commits said. With it, the released version is the git tag, which is what we meant all along.Verified locally
In a throwaway clone with a baseline tag,
release-plz updateafter each kind of commit:ci:touching a workflowtest:touchingtests/cli.rsdocs:touching CLAUDE.mddocs:touching README.mdfix:touchingsrc/main.rsAlso
cargo test --locked(23 tests) andcargo package --listshowing exactlyCargo.lock,Cargo.toml,LICENSE,src/main.rsplus cargo's own metadata files.