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: 5 additions & 1 deletion .github/workflows/cargo-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ jobs:
return
fi

if cargo info --locked -q "$crate"@"$VERSION" > /dev/null; then
# Query crates.io from /tmp in a subshell so `cargo info` does not
# read the workspace manifest or lockfile. The subshell exits
# back to the original PWD automatically. `--locked` is omitted
# because there is no Cargo.lock in /tmp.
if (cd /tmp && cargo info -q "$crate"@"$VERSION") > /dev/null; then
echo "PUBLISH_${crate_env_var}=false" >> "$GITHUB_ENV"
echo "✅ $crate@$VERSION already exists."
else
Expand Down
Loading