fix(nightly): dedupe publish assets across overlapping globs

The artifacts/**/*.zip glob overlaps artifacts/**/velopack/**/*, so a
zip inside a velopack dir would be uploaded twice and fail the release
create. Track seen paths and append each file once.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
OmikronApex 2026-07-12 23:09:11 +02:00
parent a56ef7828c
commit ec6a84c3c8

View File

@ -375,10 +375,15 @@ jobs:
artifacts/**/*.zip
)
# Filter to real files (globs that matched nothing expand to nothing
# under nullglob, but guard against directories sneaking in).
# under nullglob, but guard against directories sneaking in) and
# dedupe: the *.zip glob overlaps the velopack/** glob, and gh
# release create fails on duplicate asset names.
declare -A seen
files=()
for a in "${assets[@]}"; do
[[ -f "$a" ]] && files+=("$a")
[[ -f "$a" && -z "${seen[$a]:-}" ]] || continue
seen["$a"]=1
files+=("$a")
done
if [[ ${#files[@]} -eq 0 ]]; then
echo "::error::No release assets found under artifacts/ — refusing to publish an empty nightly release."