diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4ebbbab..bd9e541 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -38,6 +38,14 @@ jobs: - name: Check for PDF artifact run: file ${{ env.PDF_NAME }} || grep -q ' PDF ' + - name: Delete old release assets + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + uses: mknejp/delete-release-assets@v1 + with: + token: ${{ secrets.RELEASE_TOKEN }} + tag: latest + assets: ${{ env.PDF_NAME }} + - name: Release PDF artifact if: github.event_name == 'push' && github.ref == 'refs/heads/main' uses: softprops/action-gh-release@v2