Skip to content

fix(publish): skip crates marked publish = false - #693

Merged
goosewobbler merged 3 commits into
mainfrom
fix/692-cargo-publish-false
Oct 22, 2026
Merged

goosewobbler merged 3 commits into
mainfrom
fix/692-cargo-publish-false

Conversation

@goosewobbler

@goosewobbler goosewobbler commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Description

Publish's cargo discovery (findCrates) took every update directory with a Cargo.toml, so a crate marked publish = false or publish = [] was sent to cargo publish. The usual case is a napi-rs package: package.json plus a crate that's never meant for crates.io. Without CARGO_REGISTRY_TOKEN the release failed at the auth check; with one, cargo publish refused the crate.

The version side already skipped these crates. Both now share isCratePublishable from @releasekit/config.

This matters more with #690, which turns cargo publishing on by default for repos with no publish block, so it should land before or with #690.

Related Issue(s)

Closes #692

Type of Change

  • feat — New feature
  • fix — Bug fix
  • docs — Documentation change
  • refactor — Code refactoring
  • test — Adding or updating tests
  • chore — Maintenance, dependencies, tooling
  • Breaking change — Requires major version bump

Scope

  • @releasekit/version
  • @releasekit/notes
  • @releasekit/publish
  • @releasekit/release
  • @releasekit/config
  • @releasekit/core
  • CI / workflows
  • Root / monorepo

Checklist

  • Lint passes (pnpm lint)
  • Tests pass (pnpm test)
  • Typecheck passes (pnpm typecheck)
  • Documentation updated (if applicable)
  • Breaking changes noted in description

Testing Notes

New cargo-publish.spec.ts cases: a hybrid update whose Cargo.toml sets publish = false or publish = [] runs no cargo command and records no cargo output. Both fail with the skip removed. Config, version and publish suites pass (turbo run test --force).

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

This PR appears safe to merge.

Summary

Cargo publishing now skips crates marked publish = false or publish = [].

  • Crates marked off-registry stay out of Cargo publishing.

Reviews (1) · Last reviewed commit: "fix(publish): skip crates marked publish..." · Reviewed by Greptile

Publish's cargo discovery took every update directory with a Cargo.toml,
so a crate with `publish = false` or `publish = []` (typically a napi-rs
package's crate) was sent to `cargo publish`, failing the release. The
version side already skipped these; both now share isCratePublishable.

Closes #692

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Standing release PR: #614 · v0.42.0 queued (4 packages) · open 82d 3h 50m · ✅ ready to merge

Release Preview — v0.41.2 → v0.41.3

Note: Labels on this PR are advisory in standing-pr mode. Bumps come from conventional commits in the standing PR; override by editing labels on the standing PR itself. Add release:immediate to bypass the standing PR and release this PR directly.

These changes will be added to the release PR (#614) when merged:

Changelog

monorepo 0.41.2 → 0.41.3

Changed

  • name the empty-registry-list case in isCratePublishable (config)

Fixed

  • drop redundant isCratePublishable comment (publish)
  • skip crates marked publish = false (publish) (#692)

All packages → 0.41.3 (sync versioning)

  • @releasekit/version
  • @releasekit/notes
  • @releasekit/publish
  • @releasekit/release

After merge — predicted release

No version escalation — this PR's changes will be included in the queued release without affecting the projected versions.

Package Standing PR This PR After merge
monorepo 0.42.0 0.41.3 0.42.0

Updated automatically by ReleaseKit

github-actions Bot and others added 2 commits October 22, 2026 22:54
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…able

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

Cargo publish ignores publish = false in Cargo.toml

1 participant