Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,17 @@ jobs:
run: |
set -euo pipefail

if ! gh release view "$LATEST" --repo "$REPO" > /dev/null 2>&1; then
if ! asset_count=$(gh release view "$LATEST" --repo "$REPO" --json assets --jq '.assets | length'); then
echo "no latest release yet (made by master builds) - keeping the current nightly"
exit 0
fi

# gh release download fails immediately when the release has no assets.
if [ "$asset_count" -eq 0 ]; then
echo "latest has no files - keeping the current nightly"
exit 0
fi

mkdir assets
gh release download "$LATEST" --repo "$REPO" --dir assets
ls -la assets
Expand Down
Loading