From 8652ce6a315cdd64f551289ec15320530a393d51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=B6glinger-Stelzer?= Date: Sat, 28 Feb 2026 15:21:03 +0100 Subject: [PATCH 1/2] Added missing version stamping --- .github/workflows/release.yml | 20 ++++++++++++++++++++ .gitignore | 1 + 2 files changed, 21 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1197e05..0883d04 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,6 +24,26 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Install vpatch + shell: pwsh + run: | + dotnet tool install --global Nefarius.Tools.Vpatch + "$env:USERPROFILE\.dotnet\tools" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + + - name: Stamp version in resource file + shell: pwsh + run: | + $tagVersion = "${{ github.ref_name }}".TrimStart("v") + $versionParts = $tagVersion.Split(".") + if ($versionParts.Count -eq 3) { + $tagVersion = "$tagVersion.0" + } + elseif ($versionParts.Count -ne 4) { + throw "Unsupported tag version format '$tagVersion'. Expected 3 or 4 numeric segments." + } + + vpatch --stamp-version "$tagVersion" --target-file "Injector/Injector.rc" --resource.file-version --resource.product-version + - name: Add MSBuild to PATH uses: microsoft/setup-msbuild@v2 diff --git a/.gitignore b/.gitignore index 8a30d25..55b3ba4 100644 --- a/.gitignore +++ b/.gitignore @@ -396,3 +396,4 @@ FodyWeavers.xsd # JetBrains Rider *.sln.iml +/.release-local From 9cd778fe2b87e25bdb1abf91a776e68bb51c3673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=B6glinger-Stelzer?= Date: Sat, 28 Feb 2026 15:26:04 +0100 Subject: [PATCH 2/2] Update release.yml --- .github/workflows/release.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0883d04..714251f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,6 +42,13 @@ jobs: throw "Unsupported tag version format '$tagVersion'. Expected 3 or 4 numeric segments." } + $versionParts = $tagVersion.Split(".") + foreach ($part in $versionParts) { + if ($part -notmatch '^\d+$') { + throw "Unsupported tag version '$tagVersion'. Each segment in versionParts must be numeric before calling vpatch." + } + } + vpatch --stamp-version "$tagVersion" --target-file "Injector/Injector.rc" --resource.file-version --resource.product-version - name: Add MSBuild to PATH