diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3c4a228..f8a44b5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -370,7 +370,10 @@ jobs: run: | set -euo pipefail version="${{ needs.create-release.outputs.version }}" - status="$(curl -sS -o /dev/null -w "%{http_code}" "https://crates.io/api/v1/crates/precursor/$version")" + status="$(curl -sS -o /dev/null -w "%{http_code}" \ + -H "User-Agent: precursor-release-ci" \ + -H "Accept: application/json" \ + "https://crates.io/api/v1/crates/precursor/$version")" if [ "$status" = "200" ]; then echo "already_published=true" >> "$GITHUB_OUTPUT" echo "precursor $version is already published on crates.io; skipping cargo publish." @@ -397,7 +400,10 @@ jobs: set -euo pipefail version="${{ needs.create-release.outputs.version }}" for attempt in $(seq 1 18); do - status="$(curl -sS -o /dev/null -w "%{http_code}" "https://crates.io/api/v1/crates/precursor/$version")" + status="$(curl -sS -o /dev/null -w "%{http_code}" \ + -H "User-Agent: precursor-release-ci" \ + -H "Accept: application/json" \ + "https://crates.io/api/v1/crates/precursor/$version")" if [ "$status" = "200" ]; then echo "Confirmed precursor $version on crates.io." exit 0