Skip to content

Commit bafc0d9

Browse files
committed
Release fix
1 parent d9fb580 commit bafc0d9

1 file changed

Lines changed: 16 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,12 @@ jobs:
315315
TAG: ${{ github.event_name == 'workflow_dispatch' && format('v{0}', github.event.inputs.version) || github.ref_name }}
316316
VPK_TOKEN: ${{ secrets.GITHUB_TOKEN }}
317317
run: |
318-
for releases_dir in $(find artifacts -type d -name Releases); do
319-
artifact_dir="$(basename "$(dirname "$releases_dir")")"
318+
found_assets=0
319+
320+
while IFS= read -r assets_file; do
321+
found_assets=1
322+
releases_dir="$(dirname "$assets_file")"
323+
artifact_dir="$(basename "$releases_dir")"
320324
case "$artifact_dir" in
321325
*win-x64*) channel="win-x64" ;;
322326
*linux-x64*) channel="linux-x64" ;;
@@ -325,6 +329,9 @@ jobs:
325329
*) echo "Unknown Velopack artifact channel for $artifact_dir"; exit 1 ;;
326330
esac
327331
332+
echo "Uploading Velopack assets for channel '$channel' from '$releases_dir':"
333+
cat "$assets_file"
334+
328335
max_attempts=3
329336
attempt=1
330337
until vpk upload github \
@@ -344,4 +351,10 @@ jobs:
344351
sleep "$sleep_seconds"
345352
attempt=$((attempt + 1))
346353
done
347-
done
354+
done < <(find artifacts -type f -name 'assets.*.json' | sort)
355+
356+
if [ "$found_assets" -eq 0 ]; then
357+
echo "No Velopack assets.*.json files found in downloaded artifacts."
358+
find artifacts -maxdepth 3 -type f | sort
359+
exit 1
360+
fi

0 commit comments

Comments
 (0)