Skip to content

chore(release): stop publishing to crates.io - #25

Merged
senamakel merged 3 commits into
mainfrom
release-without-crates-io
Aug 14, 2026
Merged

chore(release): stop publishing to crates.io#25
senamakel merged 3 commits into
mainfrom
release-without-crates-io

Conversation

@senamakel

@senamakel senamakel commented Aug 14, 2026

Copy link
Copy Markdown
Member

The problem

Every release has needed two runs: one that tags and fails, then a manual
re-run with existing_tag to actually build the bundles. That happened on
v0.2.3, v0.3.0 and v0.4.0.

The cause is a gate that does not do what its own comment says:

# `always()` so a skipped or failed publish still yields a target …
if: ${{ always() && (inputs.existing_tag != '' || needs.publish.result == 'success') }}

A failed publish does not yield a target — the condition requires success.
So cargo publish failing with please provide a non-empty token skipped
release-target, and with it every artifact job and the GitHub release.

The diagnosis was already written down next to it, and it is correct:

What the bundles actually need is a tag and a version — not a successful
crates.io upload. … a missing registry token took the module artifacts down
with it even though nothing about them touches crates.io.

Only the fix was missing.

The change

This crate is not published to crates.io — hosts consume it as a git submodule
and get its behaviour as the module artifacts this workflow builds. A registry
upload is a third distribution channel nobody reads. So the step is removed
rather than repaired with a token.

  • cargo publish step deleted. No CARGO_REGISTRY_TOKEN anywhere.
  • cargo package kept, so a manifest that could not be packaged is still
    caught. Nothing uploads it.
  • publish = false in Cargo.toml, so a local cargo publish refuses
    rather than quietly succeeding and creating the channel this removes.
    Verified: error: tinywallet cannot be published.
  • documentation = "https://docs.rs/tinywallet" removed — docs.rs only
    builds published crates, so that link was dead.

The gate now means what it says. It still needs always(), but for the one
real reason: publish is skipped on the existing_tag recovery path. It is
deliberately not tolerant of a failure there, because that job now only
versions, packages and tags — and without a tag there is nothing to attach
bundles to. The comment says so.

The job id stays publish because several needs: / needs.publish.*
references depend on it; its display name is now "Version and tag".

Verification

python -c "yaml.safe_load(...)"      parses; every `needs:` resolves
cargo package --locked -p tinywallet clean
cargo publish --dry-run              refuses, as intended

Next release should be a single run that ends with the GitHub release and its
artifacts. existing_tag stays as the recovery path for a run that tags and
then fails in the bundle matrix — which is what it was for.

Summary by CodeRabbit

  • Release Process

    • Updated release automation to build and upload artifacts without publishing the crate to a package registry.
    • Improved handling of existing tags and skipped publishing jobs.
    • Renamed the publishing workflow step to clarify its versioning and tagging role.
  • Package Metadata

    • Marked the package as non-publishable.
    • Removed the external documentation link from package metadata.

senamakel and others added 3 commits August 15, 2026 00:50
The release workflow no longer uploads the crate to crates.io, as it is consumed as a git submodule and shipped as module artifacts instead. The `cargo publish` step is removed, though `cargo package` still runs to validate the manifest. The `release-target` job now gates strictly on the tag being created and pushed, rather than on a registry upload that could fail independently and block artifact builds.

Auto-committed-on: macbook
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Update the release workflow's existing_tag input description to accurately reflect that it skips the version bump and tagging, rather than the crates.io publish, and to use "upload" instead of "publish" for artifact handling.

Auto-committed-on: macbook
Co-authored-by: Medulla <medulla@tinyhumans.ai>
The crate is consumed as a git submodule rather than from crates.io, so the `publish = false` flag is added to make local `cargo publish` commands fail explicitly instead of silently creating an unused distribution channel. The `documentation` field is also removed since it pointed to docs.rs, which only builds for published crates, leaving the link dead; documentation is now provided via `cargo doc` from the repository.

Auto-committed-on: macbook
Co-authored-by: Medulla <medulla@tinyhumans.ai>
@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 7f96b7ca-8b56-4a49-b39a-37e193ac9b9e

📥 Commits

Reviewing files that changed from the base of the PR and between 54bcfeb and 9bb7a4d.

📒 Files selected for processing (2)
  • .github/workflows/release.yml
  • Cargo.toml

📝 Walkthrough

Walkthrough

The crate metadata now disables registry publication and documents local documentation. The release workflow versions, packages, tags, builds, and uploads artifacts without cargo publish. Existing-tag recovery can run when the version-and-tag job is skipped.

Changes

Release distribution changes

Layer / File(s) Summary
Package distribution metadata
. \Cargo.toml``
The package removes its docs.rs URL, documents the local documentation source, and sets publish = false.
Artifact release workflow
.github/workflows/release.yml
The workflow removes registry publication and token use. The existing-tag path and release-target conditions now support artifact generation after a pushed tag, including skipped version-and-tag runs.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 9bb7a

This change stops crates.io publication while retaining package validation and artifact release through the existing tagging flow; no actionable merge-blocking risk remains after normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant GitHubActions
  participant VersionAndTag
  participant ReleaseTarget
  GitHubActions->>VersionAndTag: Version, package, and push tag
  VersionAndTag->>ReleaseTarget: Provide pushed-tag release condition
  ReleaseTarget->>GitHubActions: Build and upload release artifacts
Loading

Poem

A rabbit checks the release trail,
No registry gate, no shipping mail.
Tags hop forward, artifacts rise,
Local docs bloom beneath clear skies.
The crate stays home, neat and bright.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: stopping publication of the crate to crates.io.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@tinysweeper tinysweeper Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tinysweeper found nothing blocking. Approving.

             $0.0305 · 58,345 in / 17,237 out · 14,848 cached (25%) · deepseek/deepseek-v4-pro-0813, openrouter/openai/text-embedding-3-small · 191 embedded
critique:    $0.0141 · 24,013 in / 5,937 out  · 3,456 cached (14%)  · deepseek/deepseek-v4-pro-0813
security:    $0.0097 · 22,848 in / 1,019 out  · 2,688 cached (12%)  · deepseek/deepseek-v4-pro-0813
description: $0.0027 · 4,478 in  / 1,744 out  · 1,792 cached (40%)  · deepseek/deepseek-v4-pro-0813

@tinysweeper tinysweeper Bot added the priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect. label Aug 14, 2026
@senamakel
senamakel merged commit 22141ec into main Aug 14, 2026
17 checks passed
@senamakel
senamakel deleted the release-without-crates-io branch August 14, 2026 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority: p3 Whenever. Cosmetic, a nicety, or a cleanup with no user visible effect.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant