-
Notifications
You must be signed in to change notification settings - Fork 5
/
pipeline-publish-stable.yml
43 lines (36 loc) · 1.1 KB
/
pipeline-publish-stable.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
trigger: none
pr: none
pool:
vmImage: 'windows-latest'
steps:
# Explicit restore helps avoid the issue described here:
# https://developercommunity.visualstudio.com/content/problem/983843/dotnet-build-task-does-not-use-nugetorg-for-one-pr.html
- task: DotNetCoreCLI@2
displayName: 'DotNet Restore'
inputs:
command: 'restore'
includeNugetOrg: true
projects: |
**/*.csproj
- task: DotNetCoreCLI@2
displayName: 'DotNet Build'
inputs:
command: 'build'
arguments: '/WarnAsError --no-restore --configuration Release'
projects: |
**/*.csproj
- task: DotNetCoreCLI@2
displayName: 'DotNet Test'
inputs:
command: 'test'
arguments: '--no-restore --no-build --configuration Release'
projects: |
**/*Tests*.csproj
- script: dotnet pack $(Build.SourcesDirectory)/DomainModeling/DomainModeling.csproj /WarnAsError --no-restore --configuration Release -o $(Build.ArtifactStagingDirectory)
displayName: 'DotNet Pack'
- task: NuGetCommand@2
displayName: 'NuGet Push'
inputs:
command: 'push'
nuGetFeedType: 'external'
publishFeedCredentials: 'NuGet'