fix(ci): increase npm CDN propagation timeout with incremental backoff

npm registry behind CDN can take 1-5 minutes for dist-tag to propagate
to edge nodes. Extend max attempts from 12 to 60 and use incremental
backoff: 5s for first 12 attempts, then 10s.
This commit is contained in:
修雨
2026-07-24 18:48:08 +08:00
parent b4e92f4e65
commit 98309fa239
+7 -2
View File
@@ -1867,7 +1867,7 @@ jobs:
set -eu
. ./scripts/release/release-lib.sh
attempt=1
max_attempts=12
max_attempts=60
while :; do
delivered="$(npm view dingtalk-workspace-cli "dist-tags.$NPM_TAG" \
--registry=https://registry.npmjs.org --prefer-online)"
@@ -1885,7 +1885,12 @@ jobs:
exit 1
fi
echo "npm $NPM_TAG still reports older v$delivered; waiting for registry propagation ($attempt/$max_attempts)."
sleep 5
# incremental backoff: 5s for first 12 attempts (1 min), then 10s
if [ "$attempt" -lt 12 ]; then
sleep 5
else
sleep 10
fi
attempt=$((attempt + 1))
done