77 строки
2.6 KiB
YAML
77 строки
2.6 KiB
YAML
# Go
|
|
# Build your Go project.
|
|
# Add steps that test, save build artifacts, deploy, and more:
|
|
# https://docs.microsoft.com/azure/devops/pipelines/languages/go
|
|
|
|
trigger:
|
|
tags:
|
|
include:
|
|
- v*
|
|
|
|
variables:
|
|
- name: skipComponentGovernanceDetection
|
|
value: true
|
|
|
|
pool:
|
|
vmImage: windows-latest
|
|
|
|
steps:
|
|
- task: GoTool@0
|
|
inputs:
|
|
version: '1.17'
|
|
displayName: Install Go
|
|
|
|
- powershell: |
|
|
$env:GOARCH="arm64"
|
|
go build -v -o "$(Build.BinariesDirectory)\\vscode-winsta11er-arm64.exe" -ldflags -H=windowsgui ./stable
|
|
displayName: Build arm64 (Stable)
|
|
|
|
- powershell: |
|
|
$env:GOARCH="amd64"
|
|
go build -v -o "$(Build.BinariesDirectory)\\vscode-winsta11er-x64.exe" -ldflags -H=windowsgui ./stable
|
|
displayName: Build x64 (Stable)
|
|
|
|
- powershell: |
|
|
$env:GOARCH="arm64"
|
|
go build -v -o "$(Build.BinariesDirectory)\\vscode-winsta11er-insiders-arm64.exe" -ldflags -H=windowsgui ./insiders
|
|
displayName: Build arm64 (Insiders)
|
|
|
|
- powershell: |
|
|
$env:GOARCH="amd64"
|
|
go build -v -o "$(Build.BinariesDirectory)\\vscode-winsta11er-insiders-x64.exe" -ldflags -H=windowsgui ./insiders
|
|
displayName: Build x64 (Insiders)
|
|
|
|
- task: AzureKeyVault@1
|
|
inputs:
|
|
azureSubscription: "vscode-builds-subscription"
|
|
KeyVaultName: vscode
|
|
SecretsFilter: "ESRP-PKI,esrp-aad-username,esrp-aad-password"
|
|
displayName: Azure Key Vault
|
|
|
|
- task: EsrpClientTool@1
|
|
displayName: Download ESRPClient
|
|
|
|
- powershell: |
|
|
$EsrpClientTool = (gci -directory -filter EsrpClientTool_* $(Agent.RootDirectory)\_tasks | Select-Object -last 1).FullName
|
|
$EsrpCliZip = (gci -recurse -filter esrpcli.*.zip $EsrpClientTool | Select-Object -last 1).FullName
|
|
mkdir -p $(Agent.TempDirectory)\esrpcli
|
|
Expand-Archive -Path $EsrpCliZip -DestinationPath $(Agent.TempDirectory)\esrpcli
|
|
$EsrpCliDllPath = (gci -recurse -filter esrpcli.dll $(Agent.TempDirectory)\esrpcli | Select-Object -last 1).FullName
|
|
echo "##vso[task.setvariable variable=EsrpCliDllPath]$EsrpCliDllPath"
|
|
displayName: Find ESRP CLI
|
|
|
|
- powershell: |
|
|
node build\azure-pipelines\common\sign $env:EsrpCliDllPath windows $(ESRP-PKI) $(esrp-aad-username) $(esrp-aad-password) $(Build.BinariesDirectory) 'vscode-winsta11er-*.exe'
|
|
displayName: Codesign
|
|
|
|
- task: GitHubRelease@1
|
|
inputs:
|
|
gitHubConnection: 'Microsoft'
|
|
repositoryName: '$(Build.Repository.Name)'
|
|
action: 'create'
|
|
target: '$(Build.SourceVersion)'
|
|
tagSource: 'gitTag'
|
|
releaseNotesSource: 'inline'
|
|
assets: '$(Build.BinariesDirectory)/*.exe'
|
|
changeLogCompareToRelease: 'lastFullRelease'
|
|
changeLogType: 'commitBased' |