Skip to content

ci(release): handle already-published error for cargo publish idempotency#19

Merged
ferhimedamine merged 1 commit into
mainfrom
ci/fix-crate-publish-idempotency
Mar 30, 2026
Merged

ci(release): handle already-published error for cargo publish idempotency#19
ferhimedamine merged 1 commit into
mainfrom
ci/fix-crate-publish-idempotency

Conversation

@ferhimedamine
Copy link
Copy Markdown
Contributor

Problem

When release workflow is re-triggered after a successful crates.io publish (e.g. to rebuild macOS binaries), cargo publish fails with 'already exists on crates.io index', marking the entire workflow as failed even though the crate is correctly published.

Root cause: v0.5.0 was published in run 23755682096, then re-triggered as run 23760307159 which hit the error.

Fix

Pipe cargo publish output and treat 'already exists' as a no-op. Any other failure still propagates as a real error.

Test

CI should pass (workflow-only change, no Rust compilation).

…ency

When a release workflow is re-triggered after a previous successful crates.io
publish (e.g. to rebuild macOS binaries), the publish step fails with
'already exists on crates.io index' (exit 101), marking the entire workflow
as failed even though the crate is correctly published.

Fix: pipe cargo publish output and treat 'already exists' as success.
Any other cargo publish failure still propagates as a real error.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
@ferhimedamine ferhimedamine added the auto-merge Auto-merge when CI passes label Mar 30, 2026
@ferhimedamine ferhimedamine merged commit d2f7f8b into main Mar 30, 2026
4 checks passed
@ferhimedamine ferhimedamine deleted the ci/fix-crate-publish-idempotency branch April 27, 2026 00:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge Auto-merge when CI passes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant