Skip to content

Commit cb53e61

Browse files
authored
fix(release-info): make it works even on a regular push trigger (#59)
1 parent 0f9a5a5 commit cb53e61

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

.github/workflows/global.release.info.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ jobs:
3434
- name: 'Extract version'
3535
id: version
3636
run: |
37-
VERISON_NAME=${GITHUB_REF#refs/tags/}
37+
git fetch --tags -v
38+
VERISON_NAME=$(git for-each-ref --sort=-creatordate --format='%(refname:short)' refs/tags | head -n 1)
3839
if [ "${{ inputs.remove_tag_prefix }}" = "true" ]; then
3940
# Remove the prefix (assuming the prefix is the first part before a number)
4041
VERISON_NAME=$(echo $VERISON_NAME | sed 's/^[^0-9]*//')

0 commit comments

Comments
 (0)