Skip to content

Commit

Permalink
Fix release.yml to correctly fetch all history including tags during …
Browse files Browse the repository at this point in the history
…code checkout
  • Loading branch information
uyriq committed Oct 28, 2024
1 parent 5a08b15 commit 1ede871
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
run: |
$tags = git tag --sort=-creatordate
$tagsArray = $tags -split "`n"
$prevTag = if ($tagsArray.Length -ge 2) { $tagsArray[1].Trim() } else { "'v1.2.0'" }
$prevTag = if ($tagsArray.Length -ge 2) { $tagsArray[1].Trim() } else { "" }
Write-Host "Previous tag: $prevTag"
echo "PREV_TAG=$prevTag" >> $env:GITHUB_ENV
Expand All @@ -50,7 +50,7 @@ jobs:
id: extract_tag_name
shell: pwsh
run: |
$tagName = "${GITHUB_REF#refs/tags/}"
$tagName = $env:GITHUB_REF -replace 'refs/tags/', ''
Write-Host "Tag name: $tagName"
echo "TAG_NAME=$tagName" >> $env:GITHUB_ENV
Expand Down

0 comments on commit 1ede871

Please sign in to comment.