From 504067d9c4eeecb2e5f682dc5cd2851438e3e39d Mon Sep 17 00:00:00 2001 From: uye <99072975+ABA2396@users.noreply.github.com> Date: Tue, 6 Feb 2024 11:03:26 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E5=86=85=E6=B5=8B=E7=89=88=E4=BF=AE?= =?UTF-8?q?=E6=94=B9ui=E7=89=88=E6=9C=AC=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release-nightly-ota.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) 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