Skip to content

fix(ci): Use correct organization secret name CARGO_TOKEN#34

Merged
konard merged 3 commits intomainfrom
issue-33-c92d3b8449d2
Jan 18, 2026
Merged

fix(ci): Use correct organization secret name CARGO_TOKEN#34
konard merged 3 commits intomainfrom
issue-33-c92d3b8449d2

Conversation

@konard
Copy link
Member

@konard konard commented Jan 18, 2026

Summary

This PR fixes the crates.io publishing failure caused by a mismatch between the organization secret name and the workflow's secret reference.

Problem

After PR #32 added the cargo publish step, the release still failed to publish to crates.io with the error:

error: failed to publish browser-commander v0.4.0 to registry at https://crates.io

Caused by:
  please provide a non-empty token

Root Cause: The workflow referenced secrets.CARGO_REGISTRY_TOKEN but the organization secret is named CARGO_TOKEN. Since there's no secret named CARGO_REGISTRY_TOKEN, GitHub returned an empty string.

Solution

Map the organization secret CARGO_TOKEN to the environment variable CARGO_REGISTRY_TOKEN:

env:
  CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_TOKEN }}

This ensures:

  1. The workflow uses the existing organization secret
  2. The environment variable name matches what Cargo expects

Changes

  • .github/workflows/rust.yml: Updated secret reference from secrets.CARGO_REGISTRY_TOKEN to secrets.CARGO_TOKEN in both auto-release and manual-release jobs
  • docs/case-studies/issue-33/: Added comprehensive case study with timeline, root cause analysis, and lessons learned

Test Plan

  • YAML syntax validated
  • CI run after merge should show CARGO_REGISTRY_TOKEN: *** (masked value)
  • No warning about missing token should appear
  • Package should be published to crates.io

References


Fixes #33

🤖 Generated with Claude Code

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

Issue: #33
@konard konard self-assigned this Jan 18, 2026
The workflow was referencing secrets.CARGO_REGISTRY_TOKEN but the
organization secret is named CARGO_TOKEN. This caused the publish
step to fail with "please provide a non-empty token" error.

Changes:
- Map CARGO_TOKEN org secret to CARGO_REGISTRY_TOKEN env var
- Add case study documentation for issue #33

Fixes #33

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@konard konard changed the title [WIP] Organization secret CARGO_TOKEN was not applied in Rust release CI/CD fix(ci): Use correct organization secret name CARGO_TOKEN Jan 18, 2026
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@konard konard marked this pull request as ready for review January 18, 2026 18:08
@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: $4.000121 USD
  • Calculated by Anthropic: $3.224134 USD
  • Difference: $-0.775987 (-19.40%)
    📎 Log file uploaded as Gist (1103KB)
    🔗 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.

Organization secret CARGO_TOKEN was not applied in Rust release CI/CD

1 participant