forked from appget/appget
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
137 lines (122 loc) · 3.94 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# .NET Desktop
# Build and run tests for .NET Desktop or Windows classic desktop solutions.
# Add steps that publish symbols, save build artifacts, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/windows/dot-net
name: 1.0$(Rev:.r)
# trigger:
# branches:
# include:
# - *
pool:
vmImage: 'windows-latest'
variables:
solution: '**/AppGet.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
steps:
- checkout: self
submodules: recursive
- task: PowerShell@2
inputs:
targetType: 'inline'
script: 'Get-ChildItem Env:'
failOnStderr: true
- task: NuGetToolInstaller@1
inputs:
versionSpec: '5.x'
checkLatest: true
- task: NuGetCommand@2
displayName: Nuget Restore
inputs:
restoreSolution: '$(solution)'
- task: Assembly-Info-NetCore@2
inputs:
Path: '$(Build.SourcesDirectory)'
FileNames: '**/*.csproj'
InsertAttributes: true
FileEncoding: 'auto'
WriteBOM: false
Company: 'AppGet Software'
Copyright: 'Copyright © 2019'
Product: 'AppGet'
Description: 'Open Package Manager for WindowsⓇ'
PackageLicenseUrl: 'https://github.com/appget/appget/blob/master/LICENSE'
PackageProjectUrl: 'https://appget.url'
RepositoryUrl: 'https://github.com/appget/appget'
VersionNumber: '$(build.buildnumber)'
FileVersionNumber: '$(build.buildnumber)'
PackageVersion: '$(build.buildnumber)'
- task: Assembly-Info-NetFramework@2
inputs:
Path: '$(Build.SourcesDirectory)'
FileNames: '**\*AssemblyInfo.cs'
InsertAttributes: false
FileEncoding: 'auto'
WriteBOM: false
Title: 'AppGet'
Product: 'AppGet'
Description: 'Open Package Manager for WindowsⓇ'
Company: 'AppGet Software'
Copyright: 'Copyright © 2019'
VersionNumber: '$(build.buildnumber)'
FileVersionNumber: '$(build.buildnumber)'
InformationalVersion: '$(build.buildnumber)'
- task: VSBuild@1
displayName: Build
inputs:
solution: '$(solution)'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
maximumCpuCount: true
- task: VSTest@2
displayName: Test
inputs:
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
testSelector: 'testAssemblies'
testAssemblyVer2: |
**\*tests.dll
!**\netcoreapp*\*.*
!**\*TestAdapter.dll
!**\obj\**
otherConsoleOptions: '/Framework:.NETFramework,Version=v4.6.1'
runInParallel: true
- task: CmdLine@2
displayName: Sign Binaries
inputs:
script: 'setup\\AzureSignTool\\AzureSignTool.exe sign ^
--description-url "https://appget.net" ^
--file-digest sha512 ^
--azure-key-vault-url $(AKV_URL) ^
--azure-key-vault-client-id $(AKV_CLIENT_ID) ^
--azure-key-vault-client-secret $(AKV_CLIENT_SECRET) ^
--azure-key-vault-certificate appget-authenticode ^
--timestamp-rfc3161 http://timestamp.digicert.com ^
--timestamp-digest sha512 ^
--verbose ^
$(build.sourcesdirectory)\src\AppGet.Gui\bin\Release\appget.exe ^
$(build.sourcesdirectory)\src\AppGet.Gui\bin\Release\appget.gui.exe ^
$(build.sourcesdirectory)\src\AppGet.Gui\bin\Release\AppGet.Manifest.dll'
failOnStderr: true
- task: CmdLine@2
displayName: Create Installer
inputs:
script: 'setup\\inno\\ISCC.exe setup\\appget.iss'
failOnStderr: true
- task: CmdLine@2
displayName: Sign Installer
inputs:
script: 'setup\\AzureSignTool\\AzureSignTool.exe sign ^
--description-url "https://appget.net" ^
--file-digest sha512 ^
--azure-key-vault-url $(AKV_URL) ^
--azure-key-vault-client-id $(AKV_CLIENT_ID) ^
--azure-key-vault-client-secret $(AKV_CLIENT_SECRET) ^
--azure-key-vault-certificate appget-authenticode ^
--timestamp-rfc3161 http://timestamp.digicert.com ^
--timestamp-digest sha512 ^
--verbose ^
$(build.artifactstagingdirectory)\appget.$(Build.BuildNumber).exe'
failOnStderr: true
- publish: '$(build.artifactstagingdirectory)'
artifact: drop