Skip to content

Commit c739cca

Browse files
committed
Work CI-CD
- Add config files and tasks to sign NuGet package.
1 parent 17f6ef4 commit c739cca

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

azure-pipelines.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,29 @@ jobs:
229229
TargetFolder: '$(Build.ArtifactStagingDirectory)'
230230
flattenFolders: true
231231

232+
- task: DotNetCoreCLI@2
233+
displayName: Install SignTool tool
234+
condition: and( succeeded(), eq(variables['System.PullRequest.PullRequestId'], '') )
235+
inputs:
236+
command: custom
237+
custom: tool
238+
arguments: install --tool-path . SignClient
239+
240+
- pwsh: |
241+
.\SignClient "Sign" `
242+
--baseDirectory "$(Build.ArtifactStagingDirectory)" `
243+
--input "**/*.nupkg" `
244+
--config "$(Build.Repository.LocalPath)\config\SignClient.json" `
245+
--filelist "$(Build.Repository.LocalPath)\config\filelist.txt" `
246+
--user "$(SignClientUser)" `
247+
--secret '$(SignClientSecret)' `
248+
--name ".NET nanoFramework firmware flasher" `
249+
--description ".NET nanoFramework firmware flasher" `
250+
--descriptionUrl "https://github.com/$env:Build_Repository_Name"
251+
displayName: Sign packages
252+
continueOnError: true
253+
condition: and( succeeded(), eq(variables['System.PullRequest.PullRequestId'], '') )
254+
232255
# publish artifacts (only possible if this is not a PR originated on a fork)
233256
- task: PublishBuildArtifacts@1
234257
condition: and( succeeded(), ne(variables['system.pullrequest.isfork'], true) )

config/SignClient.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"SignClient": {
3+
"AzureAd": {
4+
"AADInstance": "https://login.microsoftonline.com/",
5+
"ClientId": "c248d68a-ba6f-4aa9-8a68-71fe872063f8",
6+
"TenantId": "16076fdc-fcc1-4a15-b1ca-32c9a255900e"
7+
},
8+
"Service": {
9+
"Url": "https://codesign.dotnetfoundation.org/",
10+
"ResourceId": "https://SignService/3c30251f-36f3-490b-a955-520addb85001"
11+
}
12+
}
13+
}
14+

config/filelist.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
**/nanoff.*

0 commit comments

Comments
 (0)