Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

Harden CLI npm tarball check

Louis Beaumontbcf7724cf9c0
diff --git a/.github/workflows/release-cli.yml b/.github/workflows/release-cli.yml
index 6d086f2ab..b9930784e 100644
--- a/.github/workflows/release-cli.yml
+++ b/.github/workflows/release-cli.yml
@@ -641,14 +641,15 @@ jobs:
@screenpipe/cli-darwin-x64 \
@screenpipe/cli-linux-x64 \
@screenpipe/cli-win32-x64; do
- url=$(npm view "$pkg@${{ env.VERSION }}" dist.tarball)
- if [[ -z "$url" ]]; then
- echo "::error::$pkg@${{ env.VERSION }} has no dist tarball"
- exit 1
- fi
-
ok=false
for attempt in $(seq 1 30); do
+ url=$(npm view "$pkg@${{ env.VERSION }}" dist.tarball 2>/dev/null || true)
+ if [[ -z "$url" ]]; then
+ echo "::warning::$pkg@${{ env.VERSION }} metadata is not visible yet (attempt $attempt/30)"
+ sleep 10
+ continue
+ fi
+
status=$(curl -sS -o /dev/null -w "%{http_code}" -L -I "$url" || true)
if [[ "$status" == "200" ]]; then
echo "::notice::$pkg@${{ env.VERSION }} tarball is fetchable"