-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
60 lines (51 loc) · 1.64 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
pool:
vmImage: 'windows-latest'
variables:
buildConfiguration: 'Release'
steps:
- task: PowerShell@2
displayName: 'Install .NET 4.8.1'
inputs:
targetType: 'inline'
script: |
Invoke-WebRequest -Uri 'https://download.visualstudio.microsoft.com/download/pr/6f083c7e-bd40-44d4-9e3f-ffba71ec8b09/9ba926620d8e7568cbd0b84c7177a984/ndp481-devpack-enu.exe' -OutFile 'ndp481-devpack-enu.exe'
Start-Process -FilePath 'ndp481-devpack-enu.exe' -ArgumentList '/quiet' -Wait
- task: UseDotNet@2
displayName: 'Install .NET 6'
inputs:
version: '6.x'
- task: UseDotNet@2
displayName: 'Install .NET 7'
inputs:
version: '7.x'
#includePreviewVersions: true
- task: DotNetCoreCLI@2
displayName: 'Restore referenced NuGet packages'
inputs:
command: 'restore'
arguments: '--configuration $(buildConfiguration)'
- task: DotNetCoreCLI@2
displayName: 'Build'
inputs:
command: 'build'
arguments: '--configuration $(buildConfiguration) --no-restore'
- task: DotNetCoreCLI@2
displayName: 'Test'
inputs:
command: test
arguments: '--configuration $(buildConfiguration) --no-build --collect "Code coverage" --settings .runsettings'
publishTestResults: true
- task: CopyFiles@2
displayName: 'Copy artifacts to staging'
inputs:
sourceFolder: '$(Build.SourcesDirectory)'
contents: |
**/$(buildConfiguration)/**/?(*.nupkg)
**/$(buildConfiguration)/**/?(*.snupkg)
targetFolder: '$(Build.ArtifactStagingDirectory)'
flattenFolders: true
- task: PublishPipelineArtifact@1
displayName: 'Publish artifacts'
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)'
artifactName: drop