Skip to content

Commit 1383cfc

Browse files
committed
ci: fix latest release tag parsing
1 parent c9bdb21 commit 1383cfc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ jobs:
3333
3434
# fetch the latest release tag name
3535
try {
36-
$latestVersion = gh release list --limit 1 --json tagName | ConvertFrom-Json | Select-Object -ExpandProperty tagName
36+
$latestVersion = (gh release list --limit 1 --json tagName | ConvertFrom-Json)[0].tagName
3737
} catch {
3838
$latestVersion = ""
3939
}
4040
4141
# check if we successfully got a latest version and if its date matches today's date
42-
if (-not [string]::IsNullOrEmpty($latestVersion) -and ($latestVersion -match '^v([0-9]{4}\.[0-9]{2}\.[0-9]{2})\.([0-9]+)$')) {
42+
if (-not [string]::IsNullOrEmpty($latestVersion) -and ($latestVersion -match '^v([0-9]{4}\.[0-9]{1,2}\.[0-9]{1,2})\.([0-9]+)$')) {
4343
$latestDate = $Matches[1]
4444
$latestIncrement = [int]$Matches[2]
4545

0 commit comments

Comments
 (0)