mirror of https://github.com/winsw/winsw
Upgrade build flows
parent
69933f3179
commit
d466bade0f
|
@ -27,12 +27,29 @@ jobs:
|
|||
Release:
|
||||
BuildConfiguration: Release
|
||||
steps:
|
||||
- task: UseDotNet@2
|
||||
displayName: Install .NET SDK
|
||||
inputs:
|
||||
packageType: sdk
|
||||
version: 5.x
|
||||
includePreviewVersions: true
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: Build
|
||||
inputs:
|
||||
command: build
|
||||
projects: src\WinSW.sln
|
||||
arguments: -c $(BuildConfiguration) -p:Version=$(BuildVersion)
|
||||
- script: |
|
||||
dotnet build -c $(BuildConfiguration) src\WinSW.sln -p:Version=$(BuildVersion)
|
||||
dotnet publish -c $(BuildConfiguration) -f netcoreapp3.1 src\WinSW\WinSW.csproj -p:Version=$(BuildVersion)
|
||||
dotnet publish -c $(BuildConfiguration) -f netcoreapp3.1 -r win-x64 src\WinSW\WinSW.csproj -p:PublishSingleFile=true -p:PublishTrimmed=true -p:Version=$(BuildVersion)
|
||||
dotnet publish -c $(BuildConfiguration) -f netcoreapp3.1 -r win-x86 src\WinSW\WinSW.csproj -p:PublishSingleFile=true -p:PublishTrimmed=true -p:Version=$(BuildVersion)
|
||||
displayName: Build
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: Test
|
||||
inputs:
|
||||
command: test
|
||||
projects: src\WinSW.Tests\WinSW.Tests.csproj
|
||||
arguments: -c $(BuildConfiguration) --no-build
|
||||
- task: NuGetToolInstaller@1
|
||||
displayName: Install Nuget
|
||||
inputs:
|
||||
|
@ -44,30 +61,18 @@ jobs:
|
|||
packagesToPack: WinSW.nuspec
|
||||
versioningScheme: byEnvVar
|
||||
versionEnvVar: BuildVersion
|
||||
- script: dotnet test -c $(BuildConfiguration) --no-build src\WinSW.Tests\WinSW.Tests.csproj
|
||||
displayName: Test
|
||||
- task: PublishBuildArtifacts@1
|
||||
- publish: artifacts\WinSW.NET461.exe
|
||||
artifact: WinSW.NET461.exe_$(BuildConfiguration)
|
||||
displayName: Publish .NET 4.6.1
|
||||
inputs:
|
||||
PathtoPublish: artifacts\WinSW.NET461.exe
|
||||
ArtifactName: WinSW.NET461.exe_$(BuildConfiguration)
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Publish .NET Core 3.1
|
||||
inputs:
|
||||
PathtoPublish: artifacts\WinSW.NETCore31.zip
|
||||
ArtifactName: WinSW.NETCore31.zip_$(BuildConfiguration)
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Publish .NET Core 3.1 x64
|
||||
inputs:
|
||||
PathtoPublish: artifacts\WinSW.NETCore31.x64.exe
|
||||
ArtifactName: WinSW.NETCore31.x64.exe_$(BuildConfiguration)
|
||||
- task: PublishBuildArtifacts@1
|
||||
displayName: Publish .NET Core 3.1 x86
|
||||
inputs:
|
||||
PathtoPublish: artifacts\WinSW.NETCore31.x86.exe
|
||||
ArtifactName: WinSW.NETCore31.x86.exe_$(BuildConfiguration)
|
||||
- task: PublishBuildArtifacts@1
|
||||
- publish: artifacts\WinSW.NETCore31.zip
|
||||
artifact: WinSW.NETCore31.zip_$(BuildConfiguration)
|
||||
displayName: Publish .NET Core
|
||||
- publish: artifacts\WinSW.NETCore31.x64.exe
|
||||
artifact: WinSW.NETCore31.x64.exe_$(BuildConfiguration)
|
||||
displayName: Publish .NET Core x64
|
||||
- publish: artifacts\WinSW.NETCore31.x86.exe
|
||||
artifact: WinSW.NETCore31.x86.exe_$(BuildConfiguration)
|
||||
displayName: Publish .NET Core x86
|
||||
- publish: $(Build.ArtifactStagingDirectory)\WinSW.$(BuildVersion).nupkg
|
||||
artifact: WinSW.nupkg_$(BuildConfiguration)
|
||||
displayName: Publish Nuget
|
||||
inputs:
|
||||
PathtoPublish: $(Build.ArtifactStagingDirectory)\WinSW.$(BuildVersion).nupkg
|
||||
ArtifactName: WinSW.nupkg_$(BuildConfiguration)
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' != 'netcoreapp3.1'">
|
||||
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" />
|
||||
<Reference Include="System.ServiceProcess" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
@ -7,10 +7,6 @@
|
|||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' != 'netcoreapp3.1'">
|
||||
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\WinSW.Core\WinSW.Core.csproj" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net461;netcoreapp3.1</TargetFrameworks>
|
||||
<TargetFrameworks>net461;netcoreapp5.0</TargetFrameworks>
|
||||
<LangVersion>latest</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
|
@ -18,8 +18,7 @@
|
|||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' != 'netcoreapp3.1'">
|
||||
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" />
|
||||
<ItemGroup Condition="'$(TargetFramework)' != 'netcoreapp5.0'">
|
||||
<Reference Include="System.ServiceProcess" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
|
||||
<ItemGroup Condition="'$(TargetFramework)' != 'netcoreapp3.1'">
|
||||
<PackageReference Include="ilmerge" Version="$(ILMergeVersion)" />
|
||||
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" />
|
||||
<Reference Include="System.ServiceProcess" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
Loading…
Reference in New Issue