Skip to content

Commit b6e08da

Browse files
Update to cli tool
1 parent 12bc5e2 commit b6e08da

5 files changed

Lines changed: 29 additions & 36 deletions

File tree

Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Project>
22

33
<ItemGroup>
4-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0-beta2-19367-01" PrivateAssets="All"/>
5-
<PackageReference Include="Nerdbank.GitVersioning" Version="3.0.26" PrivateAssets="All"/>
4+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/>
5+
<PackageReference Include="Nerdbank.GitVersioning" Version="3.5.119" PrivateAssets="All"/>
66
</ItemGroup>
77

88
</Project>

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2019 Oren Novotny
3+
Copyright (c) 2023 Claire Novotny
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# CodeSigningDemo
2-
Skeleton for demonstrating use of the .NET Foundation's code signing service
2+
Skeleton for demonstrating use of the Sign CLI tool
33

44
The `azure-pipelines.yml` shows how you can use a multi-stage build with an `environment` to require
55
a manual approval for code signing. Once signed, a Release is created and pushed though a release pipeline.

azure-pipelines.yml

Lines changed: 25 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
trigger:
2-
- master
2+
- main
33
- rel/*
44

55
pr:
6-
- master
6+
- main
77
- rel/*
88

99
stages:
@@ -17,6 +17,11 @@ stages:
1717
BuildConfiguration: Release
1818

1919
steps:
20+
- task: UseDotNet@2
21+
displayName: 'Use .NET SDK 6.x'
22+
inputs:
23+
version: 6.x
24+
2025
- task: DotNetCoreCLI@2
2126
inputs:
2227
command: custom
@@ -41,7 +46,7 @@ stages:
4146
artifact: BuildPackages
4247

4348
- publish: config
44-
displayName: Publish Signing Scripts
49+
displayName: Publish signing file list
4550
artifact: config
4651

4752
- stage: CodeSign
@@ -51,38 +56,39 @@ stages:
5156
displayName: Code Signing
5257
pool:
5358
vmImage: windows-latest
54-
environment: Code Sign - Approvals
5559
variables:
5660
- group: Sign Client Credentials
5761
strategy:
5862
runOnce:
5963
deploy:
6064
steps:
61-
# If you have MSCA: https://aka.ms/mscadocs
62-
- task: ms-codeanalysis.vss-microsoft-security-code-analysis-devops.build-task-antimalware.AntiMalware@3
63-
displayName: AntiMalware Scan
65+
- task: UseDotNet@2
66+
displayName: 'Use .NET SDK 6.x'
6467
inputs:
65-
EnableServices: true
66-
FileDirPath: $(Pipeline.Workspace)\BuildPackages
68+
version: 6.x
6769

6870
- task: DotNetCoreCLI@2
6971
inputs:
7072
command: custom
7173
custom: tool
72-
arguments: install --tool-path . SignClient
74+
arguments: install --tool-path . sign --version 0.9.0-beta.23063.3
7375
displayName: Install SignTool tool
7476

7577
- pwsh: |
76-
.\SignClient "Sign" `
77-
--baseDirectory "$(Pipeline.Workspace)\BuildPackages" `
78-
--input "**/*.nupkg" `
79-
--config "$(Pipeline.Workspace)\config\SignClient.json" `
80-
--filelist "$(Pipeline.Workspace)\config\filelist.txt" `
81-
--user "$(SignClientUser)" `
82-
--secret '$(SignClientSecret)' `
83-
--name "CodeSignDemo" `
78+
.\sign "code azure-key-vault" `
79+
"**/*.nupkg" `
80+
--timestamp-url "http://timestamp.digicert.com" `
81+
--base-directory "$(Pipeline.Workspace)\BuildPackages" `
82+
--file-list "$(Pipeline.Workspace)\config\filelist.txt" `
83+
--publisher-name "CodeSignDemo" `
8484
--description "CodeSignDemo" `
85-
--descriptionUrl "https://github.com/novotnyllc/CodeSignDemo"
85+
--description-url "https://github.com/novotnyllc/CodeSignDemo" `
86+
--azure-key-vault-tenant-id "$(SignTenantId)" `
87+
--azure-key-vault-client-id "$(SignClientId)" `
88+
--azure-key-vault-certificate "$(SignClientId)" `
89+
--azure-key-vault-client-secret '$(SignClientSecret)'
90+
--azure-key-vault-certificate "$(SignKeyVaultCertificate)" `
91+
--azure-key-vault-url "$(SignKeyVaultUrl)"
8692
displayName: Sign packages
8793
8894
- publish: $(Pipeline.Workspace)/BuildPackages

config/SignClient.json

Lines changed: 0 additions & 13 deletions
This file was deleted.

0 commit comments

Comments
 (0)