- Previously, when the git push command failed, the script would still echo a success message.
- This commit also makes sure the git describe command does not terminate the script.
- When using the [action versioning recommendations](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md#recommendations), a commit can have duplicate tags (v2, v2.1.2).
- The previous implementation did not take that into consideration.
- With this new implementation, v2.1.2 is returned even when v2 is the newer commit tag (which is usually the case).
- Also, when running this script from another branch (let's say 'releases/v1'), the previous implementation would return newer tags in other branches.
- NOTE: This new implementation only searches for annotated tags.