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