nikhilbadyal/Rm Release GitHub Action
A GitHub action to remove releases with their tags based on a regex pattern.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| GITHUB_TOKEN | Github token | yes | — |
| RELEASE_PATTERN | Regex pattern to match releases. | yes | — |
| RELEASES_TO_KEEP | Number of most recent releases to keep after filtering by RELEASE_PATTERN. Defaults to 0 (delete all matching releases). | no | 0 |
| MIN_RELEASES_TO_KEEP | Safety floor for the number of most recent matching releases to keep, even when other filters would delete them. Defaults to 0. | no | 0 |
| EXCLUDE_PATTERN | Regex pattern to exclude releases from deletion. | no | — |
| DAYS_TO_KEEP | Number of days to keep releases. Releases older than this will be deleted. Defaults to 0 (delete all matching releases regardless of age). | no | 0 |
| DRY_RUN | If true, the action will only list the releases to be deleted without actually deleting them. | no | false |
| DELETE_TAGS | If true, delete each release's Git tag after deleting the release. Set to false to preserve tags. | no | true |
| DELETE_DRAFT_RELEASES_ONLY | If true, only draft releases will be considered for deletion. | no | false |
| DELETE_PRERELEASES_ONLY | If true, only prereleases will be considered for deletion. | no | false |
| TARGET_BRANCH_PATTERN | Regex pattern to match the target branch of a release's commit. Only releases whose associated commit is on a matching branch will be considered for deletion. | no | "" |
| MAX_CONCURRENCY | Maximum number of GitHub API cleanup operations to run at once. Defaults to 5 to avoid unbounded deletion fan-out. | no | 5 |
Outputs
| name | description |
|---|---|
| matched_count | Number of releases matching all deletion filters before retention rules are applied. |
| kept_count | Number of matching releases preserved by count, safety floor, or age rules. |
| delete_count | Number of releases selected for deletion, or that would be deleted during a dry run. |
| deleted_count | Number of releases actually deleted. This is 0 during dry runs. |
| deleted_tags_count | Number of Git tags actually deleted. |
| skipped_missing_tags_count | Number of release tags that were already absent when tag deletion was requested. |
| summary_json | JSON summary containing counts and release/tag deletion candidates. |