Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,12 @@ jobs:
return 0
fi
for attempt in 1 2 3; do
# Drop the cached sparse index before each attempt. rust-cache restores a
# registry index snapshot that can predate internal crates just published
# earlier in this job (e.g. gts-validator -> gts ^0.10.0), causing
# "failed to select a version for the requirement". Clearing forces cargo
# to re-fetch fresh index entries that include the new versions.
rm -rf ~/.cargo/registry/index
# Token scoped to this single invocation only, not the surrounding shell environment
if CARGO_REGISTRY_TOKEN="${{ secrets.CARGO_REGISTRY_TOKEN }}" cargo publish -p "${crate}" --locked; then
echo "${crate} published successfully on attempt ${attempt}."
Expand Down
Loading