fix(ci): retry published package verification

This commit is contained in:
morluto committed 2026-07-18 14:40:42 +08:00
1 parent e564eac631
commit c379455da7
2 files changed
+39 -12

No files matched your search

+9 -6
View File
@@ -49,13 +49,16 @@ jobs:
run: |
version="$(node --input-type=module -e 'import packageJson from "./package.json" with { type: "json" }; process.stdout.write(packageJson.version)')"
for attempt in 1 2 3 4 5 6; do
if npm view "rea-agents@${version}" version --json >/dev/null 2>&1; then
npx --yes --package "rea-agents@${version}" rea --help
npx --yes --package "rea-agents@${version}" rea --llms
npm run verify:published -- "${version}"
if npm view "rea-agents@${version}" version --json >/dev/null 2>&1 \
&& npm exec --yes --package="rea-agents@${version}" -- rea --help \
&& npm exec --yes --package="rea-agents@${version}" -- rea --llms \
&& npm run verify:published -- "${version}"; then
exit 0
fi
if [ "${attempt}" -lt 6 ]; then sleep 10; fi
if [ "${attempt}" -lt 6 ]; then
echo "Published package verification attempt ${attempt} failed; retrying in 10 seconds" >&2
sleep 10
fi
done
echo "Published rea-agents@${version} was not available from npm" >&2
echo "Published rea-agents@${version} failed registry and CLI verification" >&2
exit 1