File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 6969
7070 # Remove old NuGet packages from the draft release
7171 echo "🗑️ Removing old NuGet packages..."
72- gh release view "$TAG" --json assets --jq '.assets[].name' | grep '\.nupkg$ ' | while read -r asset ; do
73- echo "Deleting old package: $asset "
74- gh api --method DELETE "/repos/${{ github.repository }}/releases/assets/$(gh release view "$TAG" --json assets --jq ".assets[] | select(.name == \"$asset\") | .id")" || true
72+ gh release view "$TAG" --json assets -q '.assets[] | select( .name | endswith(".nupkg")) | "\(.id) \(.name)" ' | while read -r asset_id asset_name ; do
73+ echo "Deleting old package: $asset_name (ID: $asset_id) "
74+ gh api --method DELETE "/repos/${{ github.repository }}/releases/assets/$asset_id" || echo "Failed to delete $asset_name"
7575 done
7676
7777 # Upload new artifacts to the draft release
You can’t perform that action at this time.
0 commit comments