From a5b47ac3061384e8b9896458be820ef5527f6668 Mon Sep 17 00:00:00 2001 From: xyny <60004820+xynydev@users.noreply.github.com> Date: Mon, 20 Nov 2023 16:20:24 +0000 Subject: [PATCH] feat: delete all previous ISOs when re-releasing (#185) --- .github/workflows/release-iso.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release-iso.yml b/.github/workflows/release-iso.yml index 76682bec54..a913affc40 100644 --- a/.github/workflows/release-iso.yml +++ b/.github/workflows/release-iso.yml @@ -35,6 +35,7 @@ jobs: GITHUB_TOKEN: ${{ github.token }} run: | if gh release list -R ${{ github.repository_owner }}/${{ github.event.repository.name }} | grep "auto-iso"; then + gh release view auto-iso --json assets -q .assets[].name | xargs -L 1 gh release delete-asset auto-iso gh release upload auto-iso ${{ steps.isogenerator.outputs.iso-path }} -R ${{ github.repository_owner }}/${{ github.event.repository.name }} --clobber else gh release create auto-iso ${{ steps.isogenerator.outputs.iso-path }} -t ISO -n "This is an automatically generated ISO release." -R ${{ github.repository_owner }}/${{ github.event.repository.name }}