@@ -18,66 +18,64 @@ jobs:
18
18
19
19
# Install NuGet
20
20
- task : NuGetToolInstaller@0
21
- displayName : Install NuGet 5. 6.0
21
+ displayName : Install NuGet 6.0
22
22
inputs :
23
- versionSpec : 5.6 .0
23
+ versionSpec : 6.0 .0
24
24
25
25
# Install NerdBank GitVersioning
26
26
- task : DotNetCoreCLI@2
27
27
displayName : Install NBGV tool
28
28
inputs :
29
29
command : custom
30
30
custom : tool
31
- arguments : install --tool-path . nbgv
31
+ arguments : install -g nbgv
32
+
33
+ # Set Build Version
32
34
- script : nbgv cloud
33
35
displayName : Set NBGV version
34
36
35
37
# Verify headers
36
- - powershell : .\ build\build .ps1 -Target Verify
38
+ - pwsh : build/Update-Headers .ps1 -Verify
37
39
displayName : Verify headers
38
40
39
41
# Build solution
40
- - powershell : dotnet build -c Release
42
+ - script : dotnet build -c Release
41
43
displayName : Build solution
42
44
43
45
# Run .NET 6 tests
44
- - powershell : dotnet test --logger "trx;LogFileName=VsTestResultsNet6.trx" --framework net6.0 --configuration Release
46
+ - script : dotnet test -c Release -f net6.0 -l "trx;LogFileName=VSTestResults_net6.0.trx"
45
47
displayName : Run .NET 6 unit tests
46
48
47
49
# Run .NET Core 3.1 tests
48
- - powershell : dotnet test --logger "trx;LogFileName=VsTestResultsNetCore31.trx" --framework netcoreapp3.1 --configuration Release
50
+ - script : dotnet test -c Release -f netcoreapp3.1 -l "trx;LogFileName=VSTestResults_netcoreapp3.1.trx"
49
51
displayName : Run .NET Core 3.1 unit tests
50
52
51
53
# Run .NET Framework 4.7.2 tests
52
- - powershell : dotnet test --logger "trx;LogFileName=VsTestResultsNet472 .trx" --framework net472 --configuration Release
54
+ - script : dotnet test -c Release -f net472 -l "trx;LogFileName=VSTestResults_net472 .trx"
53
55
displayName : Run .NET Framework 4.7.2 unit tests
54
56
55
57
# Publish test results
56
58
- task : PublishTestResults@2
57
59
displayName : Publish test results
58
60
inputs :
59
61
testResultsFormat : ' VSTest'
60
- testResultsFiles : ' **/VsTestResults *.trx'
62
+ testResultsFiles : ' **/VSTestResults *.trx'
61
63
condition : always()
62
64
63
65
# Create the NuGet package(s)
64
- - powershell : dotnet pack --configuration Release
66
+ - script : dotnet pack -c Release
65
67
displayName : Create NuGet package(s)
66
68
67
69
# Sign package(s)
68
- - task : PowerShell@2
70
+ - pwsh : build/Sign-Package.ps1
69
71
displayName : Authenticode sign packages
70
- inputs :
71
- filePath : build/Sign-Package.ps1
72
72
env :
73
73
SignClientUser : $(SignClientUser)
74
74
SignClientSecret : $(SignClientSecret)
75
- ArtifactDirectory : bin\ nupkg
76
- condition : and(succeeded(), not(eq(variables['build.reason '], 'PullRequest')), not(eq(variables['SignClientSecret'], '')), not(eq(variables['SignClientUser'], '')))
75
+ ArtifactDirectory : bin/ nupkg
76
+ condition : and(succeeded(), not(eq(variables['Build.Reason '], 'PullRequest')), not(eq(variables['SignClientSecret'], '')), not(eq(variables['SignClientUser'], '')))
77
77
78
78
# Publish build artifacts
79
- - task : PublishPipelineArtifact@1
79
+ - publish : bin/nupkg
80
+ artifact : Packages
80
81
displayName : Publish package artifacts
81
- inputs :
82
- targetPath : .\bin\nupkg
83
- artifactName : Packages
0 commit comments