feat: Allow to filter out certain release tags
As we are comparing git tags to determine which one is right before the one we are releasing right now, it may be useful to filter out some of them and only get a git changelog from the tags we really care about.
For example:
v1.0.0 v1.0.1-beta v1.0.1-rc v1.0.1
Right now, when we tag and release v1.0.1, then the generated changelog will contain commits that happend between v1.0.1-rc and v1.0.1. However, this is not always desirable and it may make more sense to have a changelog betwwen v1.0.0 and v1.0.1. As such, lets provide this information as regex
Fixes: #25
Hello @marvinpinto do you have any feedback about this?
Hey!
Without trying any tests, I suspect that using a regex for this isn't going to work out. If you are looking to, for example, get the changelog between the last major/minor/patch release and the current, it might be better to use one of the semverXXX functions to do this.
I would guess it would involve logic in here: https://github.com/marvinpinto/actions/blob/0ae01d319c7e29e1df6a88f1bb7d6657a7855fac/packages/automatic-releases/src/main.ts#L121-L129
If you go this route, could you add a whole lot of tests (implying the positive & the negative) to protect against future regressions?
If I'm not mistaken, I believe this would also solve https://github.com/marvinpinto/actions/issues/16 :+1:
Hello @marvinpinto . Your suggestion sounds nice but it's not exactly the problem that I am trying to solve here. What I was aiming here was to add the ability to define a pattern of tags that you want to consider as proper releases because not every semver tag is a release. So with this addition, one is able to define a pattern that he uses when making releases and get correct changelogs out of it.
Your idea could perhaps be built as a separate feature as it solve a different use case imho