Skip to content

Commit 928f6ed

Browse files
authored
🚢 update code sign key code and add task to sign nupkg (#531)
1 parent 4caba99 commit 928f6ed

1 file changed

Lines changed: 38 additions & 3 deletions

File tree

‎azure-pipelines.yml‎

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ steps:
4141
inlineOperation: |
4242
[
4343
{
44-
"KeyCode": "CP-236167",
44+
"KeyCode": "CP-230012",
4545
"OperationSetCode": "SigntoolSign",
4646
"parameters": [
4747
{
@@ -69,7 +69,7 @@ steps:
6969
"ToolVersion": "1.0"
7070
},
7171
{
72-
"KeyCode": "CP-236167",
72+
"KeyCode": "CP-230012",
7373
"OperationSetCode": "SigntoolVerify",
7474
"Parameters": [
7575
{
@@ -96,7 +96,6 @@ steps:
9696
inputs:
9797
PathtoPublish: '$(Build.ArtifactStagingDirectory)/zips'
9898
ArtifactName: 'mdoc.Artifact'
99-
10099
- task: PowerShell@2
101100
name: 'mdocVersion'
102101
displayName: 'Checking remote and local version of mdoc'
@@ -111,6 +110,42 @@ steps:
111110
command: 'pack'
112111
packagesToPack: 'mdoc/mdoc.nuspec'
113112

113+
- task: EsrpCodeSigning@1
114+
displayName: 'Sign NuGet packages'
115+
condition: eq(variables['mdocVersion.NeedUpdate'], true)
116+
inputs:
117+
ConnectedServiceName: 'CodeSigning-APEX'
118+
FolderPath: '$(Build.ArtifactStagingDirectory)'
119+
Pattern: '*.nupkg'
120+
signConfigType: inlineSignParams
121+
inlineOperation: |
122+
[
123+
{
124+
"KeyCode" : "CP-401405",
125+
"OperationSetCode" : "NuGetSign",
126+
"Parameters" : [
127+
{
128+
"parameterName": "TimeStamp",
129+
"parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
130+
},
131+
{
132+
"parameterName": "FileDigest",
133+
"parameterValue": "/fd \"SHA256\""
134+
}
135+
],
136+
"ToolName" : "sign",
137+
"ToolVersion" : "1.0"
138+
},
139+
{
140+
"KeyCode" : "CP-401405",
141+
"OperationSetCode" : "NuGetVerify",
142+
"Parameters" : [],
143+
"ToolName" : "sign",
144+
"ToolVersion" : "1.0"
145+
}
146+
]
147+
SessionTimeout: 20
148+
114149
- task: NuGetCommand@2
115150
displayName: 'Publishing mdoc package to nuget.org'
116151
condition: eq(variables['mdocVersion.NeedUpdate'], true)

0 commit comments

Comments
 (0)