File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 6666 TAG="v${{ needs.build-and-test.outputs.version }}"
6767 # Wait a moment for the release to be created
6868 sleep 2
69- # Upload artifacts to the draft release
69+
70+ # Remove old NuGet packages from the draft release
71+ 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
75+ done
76+
77+ # Upload new artifacts to the draft release
78+ echo "📦 Uploading new NuGet packages..."
7079 for file in ./artifacts/*.nupkg; do
7180 gh release upload "$TAG" "$file" --clobber
7281 done
You can’t perform that action at this time.
0 commit comments