Action to delete draft releases older than a specific release.
GitHub token access the GitHub API. Requires read and write access to the repository above.
The GitHub release up to which draft releases will be deleted, i.e. any drafts older than this release will be deleted.
GitHub API to use. Defaults to API URL on the github
context.
GitHub repository to use. Defaults to the repository on the github
context.
on:
release:
types: [published]
jobs:
delete-drafts:
runs-on: ubuntu-latest
steps:
- uses: 7digital/delete-old-draft-releases-action@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
release-id: ${{ github.event.release.id }}
This action will only delete drafts in the last 100 releases.