diff --git a/.github/workflows/release-nightly-ota.yml b/.github/workflows/release-nightly-ota.yml index eb014edf71..0b6aa0f25b 100644 --- a/.github/workflows/release-nightly-ota.yml +++ b/.github/workflows/release-nightly-ota.yml @@ -108,6 +108,26 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Taggify Version + run: | + $csprojPath = "src/MaaWpfGui/MaaWpfGui.csproj" + $csprojPath = Resolve-Path -Path $csprojPath + $tag = '${{ needs.meta.outputs.tag }}' -replace '.*?/', '' + if ($tag -match '\d+(\.\d+){1,3}') { + $match = $Matches[0] + } else { + $match = "0.0.1" + } + [xml]$csproj = Get-Content -Path $csprojPath + $node = $csproj.Project.PropertyGroup | where {$_.ApplicationVersion -ne $null} + $node.InformationalVersion = $tag + $node.Version = $match + $node.FileVersion = $match + $node.AssemblyVersion = $match + $csproj.Save($csprojPath) + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Run './build.cmd DevBuild' run: | $env:GITHUB_WORKFLOW = 'dev-build-win' # pretend this is a dev-build-win workflow