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

View File

@@ -1,5 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Version>DEBUG VERSION</Version>
<FileVersion>DEBUG VERSION</FileVersion>
<AssemblyVersion>DEBUG VERSION</AssemblyVersion>
<InformationalVersion>DEBUG VERSION</InformationalVersion>
<OutputType>WinExe</OutputType>
<RootNamespace>MaaWpfGui</RootNamespace>
@@ -25,7 +28,6 @@
<AppendRuntimeIdentifierToOutputPath>false</AppendRuntimeIdentifierToOutputPath>
<OutputPath>..\..\$(Platform)\$(Configuration)\</OutputPath>
</PropertyGroup>
<!-- StyleCop -->
<PropertyGroup>
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
@@ -38,11 +40,9 @@
<IncludeSymbols>False</IncludeSymbols>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<ItemGroup>
<AdditionalFiles Include="stylecop.json" />
</ItemGroup>
<ItemGroup>
<COMReference Include="IWshRuntimeLibrary">
<WrapperTool>tlbimp</WrapperTool>
@@ -55,7 +55,6 @@
</COMReference>
</ItemGroup>
<!-- StyleCop -->
<PropertyGroup>
<WeaverConfiguration Condition="'$(Configuration)' == 'Release'">
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
@@ -68,8 +67,7 @@
<PropertyChanged />
</Weavers>
</WeaverConfiguration>
</PropertyGroup>
</PropertyGroup>
<ItemGroup>
<Page Include="Properties\DesignTimeResources.xaml" Condition="'$(DesignTime)'=='true' OR ('$(SolutionPath)'!='' AND Exists('$(SolutionPath)') AND '$(BuildingInsideVisualStudio)'!='true' AND '$(BuildingInsideExpressionBlend)'!='true')">
<Generator>MSBuild:Compile</Generator>
@@ -77,7 +75,6 @@
<ContainsDesignTimeResources>true</ContainsDesignTimeResources>
</Page>
</ItemGroup>
<ItemGroup>
<None Include="..\..\README.md">
<Pack>True</Pack>