ci: fix 元素修改

This commit is contained in:
uye
2023-10-15 03:25:51 +08:00
parent 54a3e86bd2
commit fefa67dab0
2 changed files with 10 additions and 11 deletions

View File

@@ -118,11 +118,13 @@ jobs:
- name: Taggify Version
run: |
$csprojPath = "src/MaaWpfGui/MaaWpfGui.csproj"
$csprojPath = Resolve-Path -Path $csprojPath
[xml]$csproj = Get-Content -Path $csprojPath
$csproj.Project.PropertyGroup.InformationalVersion = '${{ needs.meta.outputs.tag }}'
$csproj.Project.PropertyGroup.Version = '${{ needs.meta.outputs.tag }}'
$csproj.Project.PropertyGroup.FileVersion = '${{ needs.meta.outputs.tag }}'
$csproj.Project.PropertyGroup.AssemblyVersion = '${{ needs.meta.outputs.tag }}'
$node = $csproj.Project.PropertyGroup | where {$_.AssemblyName -ne $null}
$node.InformationalVersion = '${{ needs.meta.outputs.tag }}'
$node.Version = '${{ needs.meta.outputs.tag }}'
$node.FileVersion = '${{ needs.meta.outputs.tag }}'
$node.AssemblyVersion = '${{ needs.meta.outputs.tag }}'
$csproj.Save($csprojPath)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}