Skip to content

Commit 7431882

Browse files
authored
feat: filter releases by semver range (#1445)
1 parent 5a8b0d3 commit 7431882

16 files changed

Lines changed: 1594 additions & 839 deletions

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ You can configure Release Drafter using the following key in your
136136
| `latest` | Optional | Mark the release as latest. Only works for published releases. Can be one of: `true`, `false`, `legacy`. Default `true`. |
137137
| `version-resolver` | Optional | Adjust the `$RESOLVED_VERSION` variable using labels. Refer to [Version Resolver](#version-resolver) to learn more about this |
138138
| `commitish` | Optional | The release target, i.e. branch or commit it should point to. Default: the ref that release-drafter runs for, e.g. `refs/heads/master` if configured to run on pushes to `master`. |
139+
| `filter-by-range` | Optional | Filter releases that satisfies a semver range. Evaluates the tag name againts node's `semver.satisfies()`. Default : `"*"`. |
139140
| `filter-by-commitish` | Optional | Filter previous releases to consider only those with the target matching `commitish`. Default: `false`. |
140141
| `include-paths` | Optional | Restrict pull requests included in the release notes to only the pull requests that modified any of the paths in this array. Supports files and directories. Default: `[]` |
141142
| `exclude-paths` | Optional | Exclude pull requests from the release notes if they modified any of the paths in this array. Supports files and directories. If used with `include-paths`, exclusion takes precedence. Default: `[]` |
@@ -510,6 +511,7 @@ specified in your `release-drafter.yml` config.
510511
| `dry-run` | When enabled, no write operations (creating/updating releases or adding labels) are performed. Instead, the action logs what it would have done. Default : `false` |
511512
| `name` | The name that will be used in the GitHub release that's created or updated. This will override any `name-template` specified in your `release-drafter.yml` if defined. |
512513
| `tag` | The tag name to be associated with the GitHub release that's created or updated. This will override any `tag-template` specified in your `release-drafter.yml` if defined. |
514+
| `filter-by-range` | Filter releases that satisfies a semver range. Evaluates the tag name againts node's `semver.satisfies()`. |
513515
| `version` | The version to be associated with the GitHub release that's created or updated. This will override any version calculated by the release-drafter. |
514516
| `publish` | A boolean indicating whether the release being created or updated should be immediately published. This may be useful if the output of a previous workflow step determines that a new version of your project has been (or will be) released, as with [`salsify/action-detect-and-tag-new-version`](https://github.com/salsify/action-detect-and-tag-new-version). |
515517
| `prerelease` | Whether to draft a prerelease, with changes since another prerelease (if applicable). Default `false`. |

action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ inputs:
9494
When enabled, the action logs what it would have done instead of creating or updating releases.
9595
required: false
9696
default: ''
97+
filter-by-range:
98+
description: |
99+
Filter releases that satisfies this semver range. Evaluates the tag name againts node's semver.satisfies().
100+
required: false
101+
default: ''
97102
initial-commits-since:
98103
description: |
99104
A date in ISO format (eg: '2025-06-18T10:29:51Z') marking the initial commit for the release draft. This is applied only when no prior release is available.

badges/coverage.svg

Lines changed: 1 addition & 1 deletion
Loading

0 commit comments

Comments
 (0)