Skip to content
Merged
Show file tree
Hide file tree
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
13 changes: 7 additions & 6 deletions .github/workflows/npm-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -259,30 +259,31 @@ jobs:
run: |
set -euo pipefail
NPM_DIST_JSON=""
for attempt in {1..12}; do
# npm can accept a publish before asynchronous registry processing finishes.
for attempt in {1..60}; do
if NPM_DIST_JSON="$(npm view "@openclaw/clawscan@${PACKAGE_VERSION}" dist.tarball dist.integrity --json 2>/tmp/npm-view-error)" && [[ -n "$NPM_DIST_JSON" ]]; then
break
fi
if [[ "$attempt" == "12" ]]; then
if [[ "$attempt" == "60" ]]; then
cat /tmp/npm-view-error >&2 || true
exit 1
fi
sleep 5
sleep 10
done
printf '%s\n' "$NPM_DIST_JSON"

TAGGED_VERSION=""
for attempt in {1..12}; do
for attempt in {1..60}; do
if TAGGED_VERSION="$(npm view "@openclaw/clawscan@${NPM_DIST_TAG}" version 2>/tmp/npm-tag-view-error)" &&
[[ "$TAGGED_VERSION" == "$PACKAGE_VERSION" ]]; then
break
fi
if [[ "$attempt" == "12" ]]; then
if [[ "$attempt" == "60" ]]; then
cat /tmp/npm-tag-view-error >&2 || true
echo "Expected dist-tag ${NPM_DIST_TAG} to resolve to ${PACKAGE_VERSION}, got ${TAGGED_VERSION:-<missing>}." >&2
exit 1
fi
sleep 5
sleep 10
done

if [[ "$NPM_DIST_TAG" == "next" ]]; then
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -258,15 +258,16 @@ jobs:
set -euo pipefail
for package_name in "@openclaw/clawscan"; do
npm_dist_json=""
for attempt in {1..12}; do
# npm can accept a publish before asynchronous registry processing finishes.
for attempt in {1..60}; do
if npm_dist_json="$(npm view "${package_name}@${{ steps.publish_state.outputs.package_version }}" dist.tarball dist.integrity --json 2>/tmp/npm-view-error)" && [[ -n "$npm_dist_json" ]]; then
break
fi
if [[ "$attempt" == "12" ]]; then
if [[ "$attempt" == "60" ]]; then
cat /tmp/npm-view-error >&2 || true
exit 1
fi
sleep 5
sleep 10
done
printf '%s\n' "$npm_dist_json"
done
Expand Down
Loading