fix(action): intelligent binary name resolution
All checks were successful
Release / Release (push) Successful in 15s
All checks were successful
Release / Release (push) Successful in 15s
This commit is contained in:
11
action.yml
11
action.yml
@@ -36,7 +36,16 @@ runs:
|
||||
# Extract Tag and Download URL for the asset named 'weld'
|
||||
TAG=$(echo $RESPONSE | jq -r '.tag_name')
|
||||
# This jq filter finds the asset named 'weld' and gets its download URL
|
||||
DL_URL=$(echo $RESPONSE | jq -r '.assets[] | select(.name=="weld") | .browser_download_url')
|
||||
DL_URL=$(echo $RESPONSE | jq -r '.assets[] | select(
|
||||
(.name == "weld" or (.name | startswith("weld-binary-")) or (.name | startswith("weld-")))
|
||||
and (.name | endswith(".deb") | not)
|
||||
) | .browser_download_url' | head -n 1)
|
||||
|
||||
if [[ -z "$DL_URL" || "$DL_URL" == "null" ]]; then
|
||||
echo "❌ ERROR: Could not find a valid 'weld' binary in the release assets."
|
||||
echo "Available assets: $(echo "$RESPONSE" | jq -r '.assets[].name')"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "tag=$TAG" >> $GITHUB_OUTPUT
|
||||
echo "url=$DL_URL" >> $GITHUB_OUTPUT
|
||||
|
||||
Reference in New Issue
Block a user