diff --git a/.github/workflows/generate-index.yml b/.github/workflows/generate-index.yml index 368523ab..5fb5de78 100644 --- a/.github/workflows/generate-index.yml +++ b/.github/workflows/generate-index.yml @@ -18,9 +18,12 @@ jobs: env: WORKSPACE: ${{ github.workspace }} - - name: Delete old release - run: | - curl -X DELETE -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{github.repository}}/releases/latest + - name: Delete old Release + uses: dev-drprasad/delete-older-releases@v0.3.4 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + repo: ${{ github.repository }} + keep_latest: 1 - name: Create Release id: create_release