1- # Template helper to restore, build, and publish
2-
3- steps :
4- # # Restore
5- - task : DotNetCoreCLI@2
6- displayName : ' Restore'
7- inputs :
8- command : ' restore'
9- projects : ' **/*.csproj'
10- feedsToUse : ' config'
11- nugetConfigPath : ' $(Build.SourcesDirectory)\src\NuGEt.config'
12- restoreDirectory : ' $(Build.SourcesDirectory)\src\packages'
13-
14- # # Build
15- - task : VSBuild@1
16- displayName : Build
17- inputs :
18- platform : ' $(BuildPlatform)'
19- configuration : ' $(BuildConfiguration)'
20- clean : true
21-
22- # # Publish
23- # Publish ARM Templates
24- - template : copy-and-publish.yml
25- parameters :
26- name : WinGet.Restsource.Infrastructure
27- source : ' $(Build.SourcesDirectory)\src\WinGet.RestSource.Infrastructure\bin\$(BuildConfiguration)'
28-
29- # Publish Rest Function App
30- - template : package-and-publish.yml
31- parameters :
32- name : WinGet.RestSource.Functions
33- projects : ' $(Build.SourcesDirectory)\src\WinGet.RestSource.Functions\WinGet.RestSource.Functions.csproj'
34- buildconfig : ' $(BuildConfiguration)'
35- zipAfterPublish : True
36-
37- # # Run Unit Tests
38- - template : run-unittests.yml
39- parameters :
40- name : WinGet.RestSource.UnitTest
41- source : ' $(Build.SourcesDirectory)\src\WinGet.RestSource.UnitTest\bin\$(BuildConfiguration)\netcoreapp3.1'
42- dll : Microsoft.WinGet.RestSource.UnitTest.dll
43-
44- # # Component Governance
45- - task : ComponentGovernanceComponentDetection@0
46- displayName : Component Governance
47- inputs :
48- scanType : ' Register'
49- verbosity : ' Verbose'
50- alertWarningLevel : ' High'
1+ # Template helper to restore, build, and publish
2+
3+ steps :
4+ # # Restore
5+ - task : DotNetCoreCLI@2
6+ displayName : ' Restore'
7+ inputs :
8+ command : ' restore'
9+ projects : ' **/*.csproj'
10+ feedsToUse : ' config'
11+ nugetConfigPath : ' $(Build.SourcesDirectory)\src\NuGEt.config'
12+ restoreDirectory : ' $(Build.SourcesDirectory)\src\packages'
13+
14+ # # Build
15+ - task : VSBuild@1
16+ displayName : Build
17+ inputs :
18+ platform : ' $(BuildPlatform)'
19+ configuration : ' $(BuildConfiguration)'
20+ clean : true
21+
22+ # # Publish
23+ # Publish ARM Templates
24+ - template : copy-and-publish.yml
25+ parameters :
26+ name : WinGet.Restsource.Infrastructure
27+ source : ' $(Build.SourcesDirectory)\src\WinGet.RestSource.Infrastructure\bin\$(BuildConfiguration)'
28+
29+ # Publish Rest Function App
30+ - template : package-and-publish.yml
31+ parameters :
32+ name : WinGet.RestSource.Functions
33+ projects : ' $(Build.SourcesDirectory)\src\WinGet.RestSource.Functions\WinGet.RestSource.Functions.csproj'
34+ buildconfig : ' $(BuildConfiguration)'
35+ zipAfterPublish : True
36+
37+ # Publish x86 powershell binaries
38+ - template : copy-and-publish-powershell.yml
39+ parameters :
40+ name : WinGet.Restsource.x86PowershellSupport
41+ source : ' $(Build.SourcesDirectory)\src\WinGet.RestSource.PowershellSupport\bin\$(BuildConfiguration)\netstandard2.0'
42+ BuildPlatform : ' x86'
43+
44+ - template : copy-and-publish-powershell.yml
45+ parameters :
46+ name : WinGet.Restsource.x64PowershellSupport
47+ source : ' $(Build.SourcesDirectory)\src\WinGet.RestSource.PowershellSupport\bin\$(BuildConfiguration)\netstandard2.0'
48+ BuildPlatform : ' x64'
49+
50+ # # Run Unit Tests
51+ - template : run-unittests.yml
52+ parameters :
53+ name : WinGet.RestSource.UnitTest
54+ source : ' $(Build.SourcesDirectory)\src\WinGet.RestSource.UnitTest\bin\$(BuildConfiguration)\netcoreapp3.1'
55+ dll : Microsoft.WinGet.RestSource.UnitTest.dll
56+
57+ # # Component Governance
58+ - task : ComponentGovernanceComponentDetection@0
59+ displayName : Component Governance
60+ inputs :
61+ scanType : ' Register'
62+ verbosity : ' Verbose'
63+ alertWarningLevel : ' High'
5164 failOnAlert : true
0 commit comments