ci: gitignore generated sbom.cdx.json so cargo publish sees a clean tree#43
Conversation
The release workflow's "Generate SBOM" step writes sbom.cdx.json into the
repo root before "Publish to crates.io". `cargo publish` refuses to publish
from a dirty working tree ("files in the working directory contain changes
not yet committed: sbom.cdx.json"). Earlier publish runs never reached this
step (they failed during Sigstore attestation), so it only surfaced once the
publish job moved to a hosted runner. Ignoring the generated artifact keeps
the tree clean while preserving the dirty-check for everything else.
|
Linter diff in the way? Review this PR in Change Stack to focus on meaningful changes and expand context only when needed. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe Changes.gitignore — SBOM Artefact Exclusion
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
What
Add
/sbom.cdx.jsonto.gitignore.Why
The release workflow generates
sbom.cdx.jsonin the repo root beforecargo publish, which refuses to publish from a dirty working tree (files in the working directory contain changes not yet committed: sbom.cdx.json). This only surfaced once publish reached the crates.io step — earlier runs failed during Sigstore attestation. Ignoring the generated artifact keeps the tree clean while preserving cargo's dirty-check for everything else.ci:type. Final fix in the 0.2.1 publish chain (attestation already proven green on the hosted runner).Summary by CodeRabbit