-
Notifications
You must be signed in to change notification settings - Fork 4
/
pipeline-publish-preview-identities.yml
46 lines (40 loc) · 1.3 KB
/
pipeline-publish-preview-identities.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
trigger:
- master
pr: none
pool:
vmImage: 'windows-2022'
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
!**/*Tests*.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
# DotNet Pack needs to be run from a script in order to use --version-suffix
- script: dotnet pack $(Build.SourcesDirectory)/Identities/Identities.csproj --no-restore --configuration Release --version-suffix "preview-$(Build.BuildNumber)" -o $(Build.ArtifactStagingDirectory)
displayName: 'DotNet Pack Identities'
- task: NuGetCommand@2
displayName: 'NuGet Push'
inputs:
command: 'push'
nuGetFeedType: 'external'
publishFeedCredentials: 'NuGet'