Skip to content
This repository has been archived by the owner on Jul 26, 2023. It is now read-only.

Commit

Permalink
Add code signing
Browse files Browse the repository at this point in the history
  • Loading branch information
AArnott committed Jun 13, 2020
1 parent e19528d commit bbb8168
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
13 changes: 13 additions & 0 deletions azure-pipelines/SignClient.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"SignClient": {
"AzureAd": {
"AADInstance": "https://login.microsoftonline.com/",
"ClientId": "c248d68a-ba6f-4aa9-8a68-71fe872063f8",
"TenantId": "16076fdc-fcc1-4a15-b1ca-32c9a255900e"
},
"Service": {
"Url": "https://codesign.dotnetfoundation.org/",
"ResourceId": "https://SignService/3c30251f-36f3-490b-a955-520addb85001"
}
}
}
2 changes: 2 additions & 0 deletions azure-pipelines/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ parameters:
jobs:
- job: Windows
pool: ${{ parameters.windowsPool }}
variables:
- group: pinvoke code signing
steps:
- checkout: self
clean: true
Expand Down
15 changes: 15 additions & 0 deletions azure-pipelines/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,21 @@ steps:
- powershell: .\build.ps1 -Test
displayName: Test

- pwsh: >
dotnet tool install --tool-path obj SignClient
obj/SignClient sign
--baseDirectory '$(System.DefaultWorkingDirectory)/bin/$(BuildConfiguration)/Packages'
--input '**/*'
--config '$(System.DefaultWorkingDirectory)/azure-pipelines/SignClient.json'
--filelist '$(System.DefaultWorkingDirectory)/azure-pipelines/signfiles.txt'
--user '$(codesign_username)'
--secret '$(codesign_secret)'
--name 'PInvoke'
--descriptionUrl 'https://github.com/dotnet/pinvoke'
displayName: Code sign
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))

- task: PowerShell@2
inputs:
filePath: azure-pipelines/variables/_pipelines.ps1
Expand Down
1 change: 1 addition & 0 deletions azure-pipelines/signfiles.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/PInvoke.*.dll

0 comments on commit bbb8168

Please sign in to comment.