From 98a27430c131d9850bcbed97aae3cad727b9fd6a Mon Sep 17 00:00:00 2001 From: mkpoli Date: Sat, 27 Jun 2026 21:31:01 +0900 Subject: [PATCH] fix(ci): compute a valid VersionInfoVersion for non-tag builds A workflow_dispatch build uses the branch name (e.g. 'master') as the version, which Inno's VersionInfoVersion (added in #39) rejects as non-numeric, aborting the installer compile. Fall back to 0.0.0 when the ref isn't a vX.Y.Z tag; real release tags pass through unchanged. Makes dispatch builds verifiable again. --- .github/workflows/release.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a7ff1fb..60eb41e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -62,6 +62,10 @@ jobs: run: | $tag = if ($env:GITHUB_REF_NAME -and $env:GITHUB_REF_NAME -ne '') { $env:GITHUB_REF_NAME } else { 'dev' } $num = $tag -replace '^v', '' + # `num` feeds Inno's VersionInfoVersion, which must be numeric X.Y[.Z[.W]]. + # Branch / workflow_dispatch refs (e.g. "master") aren't versions, so fall + # back to 0.0.0 for those; real vX.Y.Z tags pass through unchanged. + if ($num -notmatch '^[0-9]+(\.[0-9]+){1,3}$') { $num = '0.0.0' } "tag=$tag" | Out-File -FilePath $env:GITHUB_OUTPUT -Append "num=$num" | Out-File -FilePath $env:GITHUB_OUTPUT -Append