Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,33 @@ 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."
}

$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
uses: microsoft/setup-msbuild@v2

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -396,3 +396,4 @@ FodyWeavers.xsd

# JetBrains Rider
*.sln.iml
/.release-local
Loading