-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathazure-pipelines.yml
61 lines (50 loc) · 1.24 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
name: $(SourceBranchName)_$(date:yyyyMMdd)$(rev:.r)
trigger:
- main
pool:
vmImage: ubuntu-latest
parameters:
- name: publishPackage
displayName: Publish Package to Nuget Library
type: boolean
default: false
variables:
solution: '**/*.sln'
buildPlatform: Any CPU
buildConfiguration: Release
steps:
- task: NuGetToolInstaller@1
displayName: Nuget Install
- task: NuGetCommand@2
displayName: Nuget Restore
inputs:
command: restore
restoreSolution: '**/*.sln'
- task: UseDotNet@2
inputs:
version: 3.1.x
- task: DotNetCoreCLI@2
displayName: Build
inputs:
command: build
projects: '**/*.csproj'
workingDirectory: $(Build.SourcesDirectory)
- task: DotNetCoreCLI@2
displayName: Test
inputs:
command: test
projects: Maybe.Test/Maybe.Test.csproj
- task: DotNetCoreCLI@2
displayName: Nuget Pack
inputs:
command: pack
packagesToPack: Maybe/Maybe.csproj
versioningScheme: off
- task: NuGetCommand@2
displayName: NuGet push
condition: eq(${{ parameters.publishPackage }}, true)
inputs:
command: push
packagesToPush: $(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg
nuGetFeedType: external
publishFeedCredentials: Nuget