mikepenz/release-changelog-builder-action

can wildcards be used in FromTag ?

Closed this issue · 5 comments

I need to managed two set of tagging versions in my repo, but only considering building the changelog for one set.
first set of tags will be v1.0.x, second set of tags will be w1.0.x, and both tag set would overlap.

In order to build the changelog only for tags v1.0.x can I use a wildcard in the FromTag ?

If not how could I proceed ?
Thank you

@xpillons it depends on the exact scenario. However there are multiple routes possible.

The best way for resolving only tags matching the w prefix, is to define a tag_resolver as part of your config

"tag_resolver": {
      "method": "semver",
      "filter": {
        "pattern": "v(.+)",
        "flags": "gu"
      }
    },

This one would then make sure only the respective fromTag is used.
Alternative you can also just pass in from and to directly.

As I assume both tags exist on the same branch structure, keep in mind that your PRs also will need some identification to be filtered out accordingly. As they are practically part of either tag.

Thanks for the quick answer, I will use your resolver. And yes I will use different tags for identifying the PRs

Something like:

{
  "tag_resolver": {
    "method": "semver",
    "filter": {
      "pattern": "v(.+)",
      "flags": "gu"
    },
    "transformer": {
      "pattern": "v(.+)",
      "target": "$1"
    }
  }
}

may do the job for you. (if you only ever care about the v releases)

Please report back if the answer helped, closing in the meantime

yes it help. I applied the filter pattern. Apologize for the late answer.