zwaldowski / semver-release-action

Create the next semantic version and tag it.
MIT License
36 stars 23 forks source link

"prefix" input doesn't seem to be used when pulling the latest tag #18

Open mattinglot opened 3 years ago

mattinglot commented 3 years ago

We have tags in the format of:

I thought using the "prefix" input would allow the script to work with this naming format, and for example identify release_4.2.1 as the latest version.

In practice the script doesn't see any of those releases, and appears to still look for non-prefixed versions instead (as if the prefix parameter hadn't been specified)

It won't use a tag like release4.2.11 and will generate a default instead. But if for example if we put in a tag like 4.2.11 (notice the lack of release) it will use that

Here is how it's being used:

- uses: zwaldowski/semver-release-action@master
        id: next_version
        with:
          bump: ${{ github.event.inputs.releasetype }}
          prefix: release_
          dry_run: true
          github_token: ${{ secrets.GITHUB_TOKEN }}

Note: I've tried both @v2 and @master

Example output where tags exist like release_4.2.0 but no non-prefixed tags exist:

Run zwaldowski/semver-release-action@master
Getting list of tags from repository
Using latest tag "0.0.0" with identifier ""
Using tag prefix "release_"
Result: "0.1.0" (tag: "release_0.1.0")
HeyZiko commented 2 years ago

I hit the same problem as @mattinglot. It behaves as though the prefix is applied on output, but is not considered on input.

WolfgangNiedental commented 2 years ago

I have encountered the same problem. The error was fixed in PR #16 , unfortunately when the PR was merged the dist folder was not updated.