From 5d77186cfc7536b8ff4fb765cad5d9e7337cbe9c Mon Sep 17 00:00:00 2001 From: Cody Date: Sat, 16 May 2026 23:39:57 -0400 Subject: [PATCH] fix(release): identify crates.io API checks --- .github/workflows/release-rust.yml | 2 +- bin/release-crates-io | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-rust.yml b/.github/workflows/release-rust.yml index 7780002..e6a9438 100644 --- a/.github/workflows/release-rust.yml +++ b/.github/workflows/release-rust.yml @@ -49,7 +49,7 @@ jobs: crate_version_exists() { local crate="$1" - curl -fsSL "https://crates.io/api/v1/crates/${crate}/versions" \ + curl -fsSL -H "User-Agent: dkdc-bookmarks-release" "https://crates.io/api/v1/crates/${crate}/versions" \ | jq -e --arg version "$version" '.versions[] | select(.num == $version and (.yanked | not))' >/dev/null } diff --git a/bin/release-crates-io b/bin/release-crates-io index 6f14b0c..ff753df 100755 --- a/bin/release-crates-io +++ b/bin/release-crates-io @@ -6,7 +6,7 @@ version="$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[] | se crate_version_exists() { local crate="$1" - curl -fsSL "https://crates.io/api/v1/crates/${crate}/versions" \ + curl -fsSL -H "User-Agent: dkdc-bookmarks-release" "https://crates.io/api/v1/crates/${crate}/versions" \ | jq -e --arg version "$version" '.versions[] | select(.num == $version and (.yanked | not))' >/dev/null }