forked from microsoft/CSS-Exchange
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
90 lines (82 loc) · 2.42 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
trigger:
branches:
include:
- main
- release
pool:
vmImage: 'windows-latest'
steps:
- script: echo Hello, world!
displayName: 'Run a one-line script'
- pwsh: |
cd .\.build
.\CodeFormatter.ps1
displayName: "Code Formatting Script"
- pwsh: |
cd .\.build
.\Build.ps1
displayName: "Build Script"
- pwsh: |
Get-Content dist\ScriptVersions.txt
displayName: "Display Script Versions file"
- pwsh: |
$tag = "v$((Get-Date).ToString(`"yy.MM.dd.HHmm`"))"
Write-Host "##vso[task.setvariable variable=ReleaseTagValue]$tag"
- task: EsrpCodeSigning@1
condition: and(succeeded(), ne (variables['Build.Reason'], 'PullRequest'), eq(variables['Build.SourceBranch'], 'refs/heads/release'))
inputs:
ConnectedServiceName: 'CSS Exchange Code Sign'
FolderPath: 'D:\a\1\s\dist'
Pattern: '*.ps1'
signConfigType: 'inlineSignParams'
inlineOperation: |
[
{
"keyCode": "CP-230012",
"operationSetCode": "SigntoolSign",
"parameters": [
{
"parameterName": "OpusName",
"parameterValue": "CSS Exchange"
},
{
"parameterName": "OpusInfo",
"parameterValue": "https://github.com/microsoft/CSS-Exchange"
},
{
"parameterName": "PageHash",
"parameterValue": "/NPH"
},
{
"parameterName": "FileDigest",
"parameterValue": "/fd sha256"
},
{
"parameterName": "TimeStamp",
"parameterValue": "/tr \"http://rfc3161.gtm.corp.microsoft.com/TSS/HttpTspServer\" /td sha256"
}
],
"toolName": "signtool.exe",
"toolVersion": "6.2.9304.0"
}
]
SessionTimeout: '60'
MaxConcurrency: '50'
MaxRetryAttempts: '5'
- task: GitHubRelease@0
displayName: 'Create GitHub Release'
condition: and(succeeded(), ne (variables['Build.Reason'], 'PullRequest'), eq(variables['Build.SourceBranch'], 'refs/heads/release'))
inputs:
gitHubConnection: 'GitHub Release'
repositoryName: microsoft/CSS-Exchange
action: create
tagSource: manual
tagPattern: 'v[0-9].[0-9].[0-9].[0-9]'
tag: $(ReleaseTagValue)
title: $(ReleaseTagValue)
releaseNotesSource: 'file'
releaseNotesFile: dist\ScriptVersions.txt
assets: |
dist\*.ps1
dist\*.nse
addChangeLog: true