Skip to content

Commit

Permalink
Fix release.yml to correctly fetch tag name during code checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
uyriq committed Oct 28, 2024
1 parent 1ede871 commit 177e4c8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ jobs:
id: extract_tag_name
shell: pwsh
run: |
$tagName = $env:GITHUB_REF -replace 'refs/tags/', ''
if ($env:GITHUB_REF -match 'refs/tags/(.*)') {
$tagName = $matches[1]
} else {
$tagName = git describe --tags $(git rev-list --tags --max-count=1)
}
Write-Host "Tag name: $tagName"
echo "TAG_NAME=$tagName" >> $env:GITHUB_ENV
Expand Down

0 comments on commit 177e4c8

Please sign in to comment.