From 2ef02ced1603809f0fc6984612de31dce1801dd8 Mon Sep 17 00:00:00 2001 From: morluto <76467478+morluto@users.noreply.github.com> Date: Tue, 6 Oct 2026 02:51:24 +0800 Subject: [PATCH] fix(release): allow npm propagation time --- .github/workflows/release.yml | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 87a44903e..3cc61c04e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -129,23 +129,22 @@ jobs: verification_root="$(mktemp -d)" trap 'rm -rf -- "${verification_root}"' EXIT cd "${verification_root}" - for attempt in $(seq 1 20); do - published_version="$(npm view "rea-agents@${version}" version --json 2>/dev/null || true)" + for attempt in $(seq 1 80); do + published_version="$(npm view --prefer-online "rea-agents@${version}" version --json 2>/dev/null || true)" if [ "${published_version}" = "\"${version}\"" ]; then - if npm exec --yes --package="rea-agents@${version}" -- rea --help \ - && npm exec --yes --package="rea-agents@${version}" -- rea --llms \ - && node "${GITHUB_WORKSPACE}/scripts/verify-published-package.mjs" "${version}"; then - exit 0 - fi - echo "Published rea-agents@${version} is visible, but CLI verification failed on attempt ${attempt}" >&2 + echo "rea-agents@${version} is visible on npm after attempt ${attempt}; verifying the published CLI." + npm exec --yes --package="rea-agents@${version}" -- rea --help + npm exec --yes --package="rea-agents@${version}" -- rea --llms + node "${GITHUB_WORKSPACE}/scripts/verify-published-package.mjs" "${version}" + exit 0 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 - if [ "${attempt}" -lt 20 ]; then + if [ "${attempt}" -lt 80 ]; then sleep 15 fi 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 publish-mcp: