fix(release): allow npm propagation time
This commit is contained in:
@@ -129,23 +129,22 @@ jobs:
|
|||||||
verification_root="$(mktemp -d)"
|
verification_root="$(mktemp -d)"
|
||||||
trap 'rm -rf -- "${verification_root}"' EXIT
|
trap 'rm -rf -- "${verification_root}"' EXIT
|
||||||
cd "${verification_root}"
|
cd "${verification_root}"
|
||||||
for attempt in $(seq 1 20); do
|
for attempt in $(seq 1 80); do
|
||||||
published_version="$(npm view "rea-agents@${version}" version --json 2>/dev/null || true)"
|
published_version="$(npm view --prefer-online "rea-agents@${version}" version --json 2>/dev/null || true)"
|
||||||
if [ "${published_version}" = "\"${version}\"" ]; then
|
if [ "${published_version}" = "\"${version}\"" ]; then
|
||||||
if npm exec --yes --package="rea-agents@${version}" -- rea --help \
|
echo "rea-agents@${version} is visible on npm after attempt ${attempt}; verifying the published CLI."
|
||||||
&& npm exec --yes --package="rea-agents@${version}" -- rea --llms \
|
npm exec --yes --package="rea-agents@${version}" -- rea --help
|
||||||
&& node "${GITHUB_WORKSPACE}/scripts/verify-published-package.mjs" "${version}"; then
|
npm exec --yes --package="rea-agents@${version}" -- rea --llms
|
||||||
exit 0
|
node "${GITHUB_WORKSPACE}/scripts/verify-published-package.mjs" "${version}"
|
||||||
fi
|
exit 0
|
||||||
echo "Published rea-agents@${version} is visible, but CLI verification failed on attempt ${attempt}" >&2
|
|
||||||
else
|
else
|
||||||
echo "rea-agents@${version} is not visible on npm yet (attempt ${attempt}/20)" >&2
|
echo "rea-agents@${version} is not visible on npm yet (attempt ${attempt}/80; up to 20 minutes)" >&2
|
||||||
fi
|
fi
|
||||||
if [ "${attempt}" -lt 20 ]; then
|
if [ "${attempt}" -lt 80 ]; then
|
||||||
sleep 15
|
sleep 15
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
echo "Published rea-agents@${version} failed registry and CLI verification" >&2
|
echo "rea-agents@${version} did not become visible on npm within 20 minutes" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|
||||||
publish-mcp:
|
publish-mcp:
|
||||||
|
|||||||
Reference in New Issue
Block a user