Skip to content

chore: release only on source changes - #18

Merged
francescodedomenico merged 1 commit into
developfrom
feature/package-include
Nov 4, 2026
Merged

francescodedomenico merged 1 commit into
developfrom
feature/package-include

Conversation

@francescodedomenico

Copy link
Copy Markdown
Owner

Summary

Stops the pipeline-only releases (0.1.2 shipped a binary identical to 0.1.1).

  • include list in Cargo.toml: release-plz only counts commits that touch files included in the package. The package is now src/**, the manifest, the lockfile and the license, with readme = false so cargo does not add the README on its own (the release archives copy it from the repo in dev/package.sh). A commit that only touches workflows, dev/, scanner configs, tests or docs opens no release PR and bumps nothing.
  • git_only = true in release-plz.toml: a foreign crate named pgen exists on crates.io (a passphrase generator). Without git_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.
  • CLAUDE.md documents both.

Verified locally

In a throwaway clone with a baseline tag, release-plz update after each kind of commit:

commits since the tag result
none nothing
ci: touching a workflow nothing
test: touching tests/cli.rs nothing
docs: touching CLAUDE.md nothing
docs: touching README.md nothing
fix: touching src/main.rs 0.1.2, changelog entry

Also cargo test --locked (23 tests) and cargo package --list showing exactly Cargo.lock, Cargo.toml, LICENSE, src/main.rs plus cargo's own metadata files.

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.
@francescodedomenico
francescodedomenico merged commit 24df0bd into develop Nov 4, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant