action-get-latest-tag
action-get-latest-tag copied to clipboard
Occasionally gives the wrong version
What happened
Sometimes this gives me the wrong version. I'm not sure why. For example, see the output of this workflow. The latest tag should be 2.9.0
, but this action is repeatedly giving 2.8.1
as the latest (which was also created earlier).

What you expected to happen
I expected that I would get the highest release for the repo by default.
How to reproduce it
I'm not sure
Oh, hmm. I'm realizing that somehow I ended up tagging that same commit twice...
I would still have hoped this GitHub action would have gotten the latest SemVer tag
Okay, this just happened again and this time the commits are definitely different.
Okay, for our purposes it looks like setting semver_only
to true
resolved that second issue.
I had the same issue with the wrong tag being selected when multiple tags were on one commit, fixed it by running echo "::set-output name=a::$(git tag --sort=v:refname | tail -n 1)"
instead of using this action. e.g.
- name: Get Lastest Tag
id: get-latest-tag
run: echo "::set-output name=tag::$(git tag --sort=v:refname | tail -n 1)"
Same bug here. Latest tag was 1.2.5 but this action takes 1.2.3 which was made like months ago. I think it happens when you use actions from branches other than main.