mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-16 01:40:46 +08:00
ci: 修复错误的Version格式
This commit is contained in:
11
.github/workflows/ci.yml
vendored
11
.github/workflows/ci.yml
vendored
@@ -119,12 +119,15 @@ jobs:
|
||||
run: |
|
||||
$csprojPath = "src/MaaWpfGui/MaaWpfGui.csproj"
|
||||
$csprojPath = Resolve-Path -Path $csprojPath
|
||||
$tag = (Invoke-Expression "git describe --abbrev=0 --tags") -replace '.*?/', ''
|
||||
$tag -match '\d+(\.\d+){0,3}'
|
||||
$match = $Matches[0]
|
||||
[xml]$csproj = Get-Content -Path $csprojPath
|
||||
$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 }}'
|
||||
$node.InformationalVersion = $tag
|
||||
$node.Version = $match
|
||||
$node.FileVersion = $match
|
||||
$node.AssemblyVersion = $match
|
||||
$csproj.Save($csprojPath)
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
16
.github/workflows/smoke-testing.yml
vendored
16
.github/workflows/smoke-testing.yml
vendored
@@ -28,21 +28,7 @@ jobs:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Taggify Version
|
||||
run: |
|
||||
$csprojPath = "src/MaaWpfGui/MaaWpfGui.csproj"
|
||||
$csprojPath = Resolve-Path -Path $csprojPath
|
||||
[xml]$csproj = Get-Content -Path $csprojPath
|
||||
$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 }}
|
||||
|
||||
|
||||
- uses: NuGet/setup-nuget@v1.2.0
|
||||
- run: |
|
||||
nuget restore MAA.sln
|
||||
|
||||
Reference in New Issue
Block a user