forked from SpecFlowOSS/SpecFlow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.yml
93 lines (81 loc) · 2.59 KB
/
build.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
parameters:
name: ''
pool: ''
nugetVersion: 5.8.0
net6SdkVersion: 6.0.x
artifactFileName: ''
appInsightsInstrumentationKey: ''
publishArtifacts: true
jobs:
- job: ${{ parameters.name }}
pool: ${{ parameters.pool }}
steps:
- checkout: self
submodules: true
clean: true
- task: CmdLine@2
displayName: 'git log'
inputs:
script: 'git log -2'
- task: NuGetToolInstaller@0
displayName: 'Use NuGet'
inputs:
versionSpec: ${{ parameters.nugetVersion }}
- task: UseDotNet@2
displayName: 'Use .NET 6 SDK'
inputs:
packageType: sdk
version: ${{ parameters.net6SdkVersion }}
includePreviewVersions: true
- task: PowerShell@2
displayName: 'dotnet --info'
inputs:
targetType: Inline
pwsh: true
script: dotnet --info
- task: PowerShell@2
inputs:
targetType: Inline
pwsh: true
script: dotnet restore --configfile $(Build.SourcesDirectory)\nuget.config
displayName: 'dotnet restore'
- task: PowerShell@2
inputs:
filePath: build.ps1
workingDirectory: ./
arguments: Debug -appInsightsInstrumentationKey '${{ parameters.appInsightsInstrumentationKey }}'
pwsh: true
displayName: 'build Debug'
- task: PowerShell@2
inputs:
filePath: build.ps1
workingDirectory: ./
arguments: Release -appInsightsInstrumentationKey '${{ parameters.appInsightsInstrumentationKey }}'
pwsh: true
displayName: 'build Release'
- task: ArchiveFiles@2
displayName: 'Archive $(Build.SourcesDirectory)'
condition: and(succeeded(), ${{ parameters.publishArtifacts}})
inputs:
rootFolderOrFile: '$(Build.SourcesDirectory)'
archiveFile: ${{ parameters.artifactFileName }}
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: SpecFlow.CI-Sources'
condition: and(succeeded(), ${{ parameters.publishArtifacts}})
inputs:
PathtoPublish: ${{ parameters.artifactFileName }}
artifactType: container
ArtifactName: 'SpecFlow.CI-BuildResult-${{ parameters.name }}'
- task: CopyFiles@2
displayName: 'Copy binlogs'
condition: ${{ parameters.publishArtifacts}}
inputs:
contents: '$(Build.SourcesDirectory)/*.binlog'
targetFolder: '$(Build.SourcesDirectory)/binlogs'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: SpecFlow.CI-Binlogs'
condition: ${{ parameters.publishArtifacts}}
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/binlogs'
artifactType: container
ArtifactName: 'SpecFlow.CI-Binlogs-${{ parameters.name }}'