Skip to content

fix(rust): Add cargo publish step to release workflow#32

Merged
konard merged 4 commits intomainfrom
issue-31-182c0e5f23ed
Jan 18, 2026
Merged

fix(rust): Add cargo publish step to release workflow#32
konard merged 4 commits intomainfrom
issue-31-182c0e5f23ed

Conversation

@konard
Copy link
Member

@konard konard commented Jan 18, 2026

Summary

This PR fixes the missing crates.io publishing step in the Rust release workflow.

Problem

The release workflow correctly detected that version 0.4.0 was not published to crates.io:

Crate: browser-commander, Version: 0.4.0, Published on crates.io: false
No changelog fragments but v0.4.0 not yet published to crates.io

However, the workflow only:

  1. Built the release binary (cargo build --release)
  2. Created a GitHub release

The actual cargo publish step was missing, so the package was never published to crates.io.

Solution

Added the missing Publish to Crates.io step to both auto-release and manual-release jobs in the workflow, following best practices from the template repository.

Changes

  • rust/scripts/publish-crate.mjs: New script to handle crates.io publishing

    • Supports both single-language and multi-language repositories
    • Handles "already exists" case gracefully
    • Uses CARGO_REGISTRY_TOKEN or CARGO_TOKEN environment variable
  • rust/scripts/rust-paths.mjs: Helper module for multi-language repo support

    • Auto-detects repository structure (root vs rust/ subfolder)
    • Provides utilities for path resolution
  • .github/workflows/rust.yml: Added Publish to Crates.io step

    • Added after Build release, before Create GitHub Release
    • Added to both auto-release and manual-release jobs
  • docs/case-studies/issue-31/: Case study documentation

    • Timeline and root cause analysis
    • Reference to CI logs and related issues

Repository Secret Requirements

The repository needs CARGO_REGISTRY_TOKEN secret configured for crates.io authentication.

Test Plan

  • YAML syntax validated
  • JavaScript syntax validated for new scripts
  • Workflow structure verified against template repository
  • Integration test (requires CI run after merge)

Related Issues

References


Fixes #31

🤖 Generated with Claude Code

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #31
@konard konard self-assigned this Jan 18, 2026
The release workflow was correctly detecting that the package was not
published to crates.io, but was missing the actual `cargo publish` step.

Changes:
- Add publish-crate.mjs script to handle crates.io publishing
- Add rust-paths.mjs helper for multi-language repository support
- Update rust.yml workflow to include publish step in both auto-release
  and manual-release jobs
- Add case study documentation for issue #31

The workflow now:
1. Builds the release binary
2. Publishes to crates.io (NEW)
3. Creates GitHub release

Fixes #31

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@konard konard changed the title [WIP] I see not actual publishing to crates.io fix(rust): Add cargo publish step to release workflow Jan 18, 2026
@konard konard marked this pull request as ready for review January 18, 2026 13:57
@konard
Copy link
Member Author

konard commented Jan 18, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Public pricing estimate: $6.282637 USD
  • Calculated by Anthropic: $3.940017 USD
  • Difference: $-2.342620 (-37.29%)
    📎 Log file uploaded as Gist (710KB)
    🔗 View complete solution draft log

Now working session is ended, feel free to review and add any feedback on the solution draft.

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.

I see not actual publishing to crates.io

1 participant