vscode-winsta11er/azure-pipelines.yml

112 строки
3.3 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: EsrpCodeSigning@1
inputs:
ConnectedServiceName: 'ESRP CodeSign'
FolderPath: '$(Build.BinariesDirectory)'
Pattern: 'vscode-winsta11er-*.exe'
signConfigType: 'inlineSignParams'
inlineOperation: |
[
{
"keyCode": "CP-230012",
"operationSetCode": "SigntoolSign",
"parameters": [
{
"parameterName": "OpusName",
"parameterValue": "VS Code"
},
{
"parameterName": "OpusInfo",
"parameterValue": "https://code.visualstudio.com/"
},
{
"parameterName": "Append",
"parameterValue": "/as"
},
{
"parameterName": "FileDigest",
"parameterValue": "/fd \"SHA256\""
},
{
"parameterName": "PageHash",
"parameterValue": "/NPH"
},
{
"parameterName": "TimeStamp",
"parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
}
],
"toolName": "sign",
"toolVersion": "1.0"
},
{
"keyCode": "CP-230012",
"operationSetCode": "SigntoolVerify",
"parameters": [
{
"parameterName": "VerifyAll",
"parameterValue": "/all"
}
],
"toolName": "sign",
"toolVersion": "1.0"
}
]
SessionTimeout: '60'
ServiceEndpointUrl: 'https://api.esrp.microsoft.com/api/v1'
MaxConcurrency: '50'
MaxRetryAttempts: '5'
- 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'