Skip to content

Commit 41b7e30

Browse files
committed
Setup VSIX signing
1 parent d762d90 commit 41b7e30

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.pipelines/vscode-powershell-Official.yml

+16
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,18 @@ extends:
113113
files_to_sign: '**/*.ps1;**/*.psd1;**/*.psm1'
114114
- pwsh: Invoke-Build Package
115115
displayName: Create package
116+
- pwsh: |
117+
npx vsce generate-manifest --packagePath out/powershell-$(package.vsixVersion).vsix
118+
cp out/powershell-$(package.vsixVersion).manifest out/powershell-$(package.vsixVersion).signature.p7s
119+
displayName: Generate VSIX manifest
120+
- task: onebranch.pipeline.signing@1
121+
displayName: Sign VSIX manifest
122+
inputs:
123+
command: sign
124+
cp_code: 'CP-401405-VSCodePublisherSign'
125+
search_root: $(Build.SourcesDirectory)/out
126+
files_to_sign: |
127+
*.signature.p7s;
116128
- job: test
117129
displayName: Build and run tests
118130
pool:
@@ -220,6 +232,10 @@ extends:
220232
'--azure-credential'
221233
'--packagePath'
222234
'$(drop)/powershell-$(vsixVersion).vsix'
235+
'--manifestPath'
236+
'$(drop)/powershell-$(vsixVersion).manifest'
237+
'--signaturePath'
238+
'$(drop)/powershell-$(vsixVersion).signature.p7s'
223239
if ([bool]::Parse('$(prerelease)')) { '--pre-release' }
224240
)
225241
npm run publish -- @publishArgs

0 commit comments

Comments
 (0)