Skip to content

Commit c14c159

Browse files
committed
Fix release script bug
1 parent 4d6c167 commit c14c159

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

scripts/release.sh

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -508,11 +508,16 @@ echo ""
508508
echo "⏳ Monitoring GitHub Actions workflow..."
509509
echo "This may take a few minutes..."
510510

511-
# Wait for workflow to start
512-
sleep 5
513-
514-
# Get the workflow run ID for this tag
515-
RUN_ID=$(gh run list --workflow=release.yml --limit=1 --json databaseId --jq '.[0].databaseId')
511+
# Poll for the workflow run triggered by this tag (may take a few seconds to appear)
512+
RUN_ID=""
513+
for i in $(seq 1 12); do
514+
RUN_ID=$(gh run list --workflow=release.yml --branch="v$VERSION" --limit=1 --json databaseId --jq '.[0].databaseId')
515+
if [[ -n "$RUN_ID" ]]; then
516+
break
517+
fi
518+
echo " Waiting for workflow to appear... (attempt $i/12)"
519+
sleep 5
520+
done
516521

517522
if [[ -n "$RUN_ID" ]]; then
518523
echo "📊 Workflow run ID: $RUN_ID"

0 commit comments

Comments
 (0)