@@ -42,45 +42,53 @@ stages:
4242 ArtifactName : signing
4343
4444- stage : CodeSign
45+ dependsOn : Build
4546 condition : and(succeeded('Build'), ne(variables['build.reason'], 'PullRequest'))
4647 jobs :
47- - deployment : CodeSign
48+ - job : CodeSign
4849 displayName : Code Signing
4950 pool :
50- vmImage : windows-latest
51- environment : Code Signing
52- strategy :
53- runOnce :
54- deploy :
55- steps :
56- - task : CmdLine@2
57- displayName : " AntiMalware Scan"
58- inputs :
59- script : |
60- Dir "$(Pipeline.Workspace)\BuildPackages"
61- "%ProgramFiles%\Windows Defender\MpCmdRun.exe" -Scan -ScanType 3 -File "$(Pipeline.Workspace)\BuildPackages"
62- failOnStderr : true
51+ vmImage : windows-latest # Code signing must run on a Windows agent for Authenticode signing (dll/exe)
52+
53+ steps :
54+
55+ # Retreive unsigned artifacts and file list
56+ - download : current
57+ artifact : signing
58+ displayName : Download signing file list
6359
64- - task : DotNetCoreCLI@2
65- inputs :
66- command : custom
67- custom : tool
68- arguments : install --tool-path . SignClient
69- displayName : Install SignTool tool
60+ - download : current
61+ artifact : BuildPackages
62+ displayName : Download build artifacts
63+
64+ - task : CmdLine@2
65+ displayName : " AntiMalware Scan"
66+ inputs :
67+ script : |
68+ Dir "$(Pipeline.Workspace)\BuildPackages"
69+ "%ProgramFiles%\Windows Defender\MpCmdRun.exe" -Scan -ScanType 3 -File "$(Pipeline.Workspace)\BuildPackages"
70+ failOnStderr : true
71+
72+ - task : DotNetCoreCLI@2
73+ inputs :
74+ command : custom
75+ custom : tool
76+ arguments : install --tool-path . SignClient
77+ displayName : Install SignTool tool
7078
71- - pwsh : |
72- .\SignClient "Sign" `
73- --baseDirectory "$(Pipeline.Workspace)\BuildPackages" `
74- --input "**/*.*" `
75- --config "$(Pipeline.Workspace)\signing\SignClient.json" `
76- --filelist "$(Pipeline.Workspace)\signing\filelist.txt" `
77- --user "$(SignClientUser)" `
78- --secret "$(SignClientSecret)" `
79- --name "DataGrid Extensions" `
80- --description "DataGrid Extensions" `
81- --descriptionUrl "https://github.com/dotnet/DataGridExtensions"
82- displayName: Sign packages
79+ - pwsh : |
80+ .\SignClient "Sign" `
81+ --baseDirectory "$(Pipeline.Workspace)\BuildPackages" `
82+ --input "**/*.*" `
83+ --config "$(Pipeline.Workspace)\signing\SignClient.json" `
84+ --filelist "$(Pipeline.Workspace)\signing\filelist.txt" `
85+ --user "$(SignClientUser)" `
86+ --secret "$(SignClientSecret)" `
87+ --name "DataGrid Extensions" `
88+ --description "DataGrid Extensions" `
89+ --descriptionUrl "https://github.com/dotnet/DataGridExtensions"
90+ displayName: Sign packages
8391
84- - publish : $(Pipeline.Workspace)\BuildPackages
85- displayName : Publish Signed Packages
86- artifact : SignedPackages
92+ - publish : $(Pipeline.Workspace)\BuildPackages
93+ displayName : Publish Signed Packages
94+ artifact : SignedPackages
0 commit comments