-
Notifications
You must be signed in to change notification settings - Fork 0
/
Meriworks.PowerShell.Sign.yml
106 lines (91 loc) · 3.54 KB
/
Meriworks.PowerShell.Sign.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
# ASP.NET
# Build and test ASP.NET projects.
# Add steps that publish symbols, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/aspnet/build-aspnet-4
trigger:
branches:
include:
- master
- develop
pool:
vmImage: 'windows-latest'
variables:
#import the passwords variable group from library
- group: 'Certificate Passwords'
- group: 'common'
- name: version.majorMinor
value: '6.2'
#build will reset to 0 whenever version.majorMinor is changed
- name: version.build
value: $[counter(variables['version.majorMinor'],0)]
#revision will never reset, starting at 300 (to mimic the last iteration from last buildserver)
- name: version.revision
value: $[counter('revision',0)]
- name: version.simple
value: $[format('{0}.{1}',variables['version.majorMinor'], variables['version.build'])]
- name: version.assembly
value: $[format('{0}.0',variables['version.simple'])]
- name: version.file
value: $[format('{0}.{1}',variables['version.simple'],variables['version.revision'])]
name: $(version.file)
steps:
- checkout: self
fetchDepth: 1
- task: NuGetToolInstaller@1
- task: NuGetCommand@2
inputs:
command: 'restore'
restoreSolution: '$(solution)'
feedsToUse: 'select'
vstsFeed: 'e199b9e1-58a8-4889-9613-ee0097517479/478b0e05-737f-44d6-baaf-a169474688e6'
- task: Assembly-Info-NetFramework@2
inputs:
Path: '$(Build.SourcesDirectory)'
FileNames: '**\AssemblyInfo.cs'
InsertAttributes: false
FileEncoding: 'auto'
WriteBOM: false
Company: 'Meriworks'
VersionNumber: '$(version.assembly)'
FileVersionNumber: '$(version.file)'
InformationalVersion: '$(version.simple)'
LogLevel: 'verbose'
FailOnWarning: false
- task: VSBuild@1
inputs:
solution: '$(solution)'
# msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactStagingDirectory)"'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'
# - task: VisualStudioTestPlatformInstaller@1
# inputs:
# packageFeedSelector: 'nugetOrg'
# versionSelector: 'latestStable'
# - task: VSTest@2
# inputs:
# testSelector: 'testAssemblies'
# testAssemblyVer2: |
# **\*.Tests.dll
# !**\*TestAdapter.dll
# !**\obj\**
# searchFolder: '$(System.DefaultWorkingDirectory)'
# platform: '$(buildPlatform)'
# configuration: '$(buildConfiguration)'
- task: NuGetCommand@2
inputs:
command: 'custom'
arguments: 'pack $(Build.SourcesDirectory)\Meriworks.PowerShell.Sign\Meriworks.PowerShell.Sign.csproj -NonInteractive -OutputDirectory $(build.artifactstagingdirectory) -Properties Configuration=Release -Verbosity Detailed -Exclude bin/**/*.*'
#C:\hostedtoolcache\windows\NuGet\5.9.1\x64\nuget.exe pack D:\a\1\s\Meriworks.PowerShell.Sign\Meriworks.PowerShell.Sign.csproj -NonInteractive -OutputDirectory D:\a\1\a -Properties Configuration=Release -Verbosity Detailed
# packagesToPack: '**\*.csproj;!**\*.Tests.csproj'
# packDestination: '$(build.artifactstagingdirectory)'
# versioningScheme: 'off'
- task: NuGetCommand@2
inputs:
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg'
nuGetFeedType: 'internal'
publishVstsFeed: 'e199b9e1-58a8-4889-9613-ee0097517479/478b0e05-737f-44d6-baaf-a169474688e6'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'