sign-and-pack-vsix.yml•2.36 kB
parameters:
- name: DependsOn
type: object
default: []
- name: VsixTarget
type: string
default: not-specified
jobs:
- job:
displayName: "Sign and Pack VSIX for ${{ parameters.VsixTarget }}"
dependsOn: ${{ parameters.DependsOn }}
variables:
VsixTarget: ${{ parameters.VsixTarget }}
VsixServerPath: $(System.DefaultWorkingDirectory)/eng/vscode
condition: and(succeeded(), ne(variables['NoPackagesChanged'], 'true'))
steps:
- checkout: self
# Download the signed MCP server binaries for this OS
- download: current
artifact: $(PipelineArtifactName)_signed
displayName: "Download signed MCP server binaries"
- powershell: |
$src = "$(Pipeline.Workspace)/$(PipelineArtifactName)_signed/$(VsixTarget)/dist/*"
$dest = "$(VsixServerPath)/server"
New-Item -ItemType Directory -Force -Path $dest
Copy-Item -Path $src -Destination $dest -Recurse -Force
displayName: "Copy signed MCP server binaries to VSIX ${{ parameters.VsixTarget }}"
# --- VS Code Extension Packaging Steps ---
- task: NodeTool@0
displayName: "Use Node.js 20.x"
inputs:
versionSpec: 20.x
- pwsh: |
npm install -g npm vsce
npm ci --no-optional
displayName: "Install npm dependencies and vsce"
workingDirectory: $(VsixServerPath)
- pwsh: ./ci-package.ps1 -os '$(VsixTarget)' -Version '$(Version)'
workingDirectory: $(VsixServerPath)
displayName: "Package VS Code Extension"
- task: PowerShell@2
inputs:
targetType: filePath
filePath: eng/scripts/New-VsixSigningManifest.ps1
arguments: -Path $(VsixServerPath)
pwsh: true
displayName: Create signing manifest
- template: pipelines/steps/azd-vscode-signing.yml@azure-sdk-build-tools
parameters:
Path: $(VsixServerPath)
Pattern: '*.signature.p7s'
- pwsh: |
New-Item -ItemType Directory -Path signed -Force
Copy-Item "$(VsixServerPath)\*.vsix" -Destination signed -Force
Copy-Item "$(VsixServerPath)\*.manifest" -Destination signed -Force
Copy-Item "$(VsixServerPath)\*.signature.p7s" -Destination signed -Force
displayName: Copy signed VSIX for publishing
- template: /eng/common/pipelines/templates/steps/publish-1es-artifact.yml
parameters:
ArtifactPath: signed
ArtifactName: vsix_package_${{ parameters.VsixTarget }}_signed