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

Commit bbb8168

Browse files
committed
Add code signing
1 parent e19528d commit bbb8168

File tree

4 files changed

+31
-0
lines changed

4 files changed

+31
-0
lines changed

azure-pipelines/SignClient.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
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+
}

azure-pipelines/build.yml

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ parameters:
44
jobs:
55
- job: Windows
66
pool: ${{ parameters.windowsPool }}
7+
variables:
8+
- group: pinvoke code signing
79
steps:
810
- checkout: self
911
clean: true

azure-pipelines/dotnet.yml

+15
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,21 @@ steps:
1010
- powershell: .\build.ps1 -Test
1111
displayName: Test
1212

13+
- pwsh: >
14+
dotnet tool install --tool-path obj SignClient
15+
16+
obj/SignClient sign
17+
--baseDirectory '$(System.DefaultWorkingDirectory)/bin/$(BuildConfiguration)/Packages'
18+
--input '**/*'
19+
--config '$(System.DefaultWorkingDirectory)/azure-pipelines/SignClient.json'
20+
--filelist '$(System.DefaultWorkingDirectory)/azure-pipelines/signfiles.txt'
21+
--user '$(codesign_username)'
22+
--secret '$(codesign_secret)'
23+
--name 'PInvoke'
24+
--descriptionUrl 'https://github.com/dotnet/pinvoke'
25+
displayName: Code sign
26+
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
27+
1328
- task: PowerShell@2
1429
inputs:
1530
filePath: azure-pipelines/variables/_pipelines.ps1

azure-pipelines/signfiles.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
**/PInvoke.*.dll

0 commit comments

Comments
 (0)