ci: 内测版修改ui版本号

This commit is contained in:
uye
2024-02-06 11:03:26 +08:00
committed by GitHub
parent c25c29d7dd
commit 504067d9c4

View File

@@ -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