-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpipelines.yaml
More file actions
75 lines (75 loc) · 2.54 KB
/
Copy pathpipelines.yaml
File metadata and controls
75 lines (75 loc) · 2.54 KB
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
trigger:
branches:
include: [ '*' ]
stages:
- stage: Build
variables:
BuildConfiguration: Release
jobs:
- job:
steps:
- task: DotNetCoreCLI@2
displayName: Restore
inputs:
command: restore
projects: '**/*.csproj'
- task: DotNetCoreCLI@2
displayName: Build
inputs:
command: build
projects: '**/*.csproj'
arguments: '-c $(BuildConfiguration)'
- task: DotNetCoreCLI@2
displayName: Test
inputs:
command: test
nobuild: true
publishTestResults: true
projects: '**/*.Tests.csproj'
arguments: '-c $(BuildConfiguration)'
- task: DotNetCoreCLI@2
displayName: Package
inputs:
command: 'pack'
includesymbols: true
nobuild: true
configuration: $(BuildConfiguration)
outputDir: '$(Build.ArtifactStagingDirectory)'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
- stage: Nightly
dependsOn: Build
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
jobs:
- deployment:
environment: Nightly
strategy:
runOnce:
deploy:
steps:
- task: NuGetCommand@2
displayName: Push to NuGet Feed
inputs:
command: 'push'
packagesToPush: '$(Pipeline.Workspace)/**/*.nupkg;!$(Pipeline.Workspace)/**/*.symbols.nupkg'
nuGetFeedType: 'internal'
publishVstsFeed: 'd709a194-9ce6-4530-a6e2-22368bf72347/0d984cd1-0749-4fe0-b7b3-debfb4ba4890'
allowPackageConflicts: true
- stage: Public
dependsOn: Build
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/heads/release/v'), ne(variables['Build.Reason'], 'PullRequest'))
jobs:
- deployment:
environment: NuGet
strategy:
runOnce:
deploy:
steps:
- task: NuGetCommand@2
inputs:
command: 'push'
packagesToPush: '$(Pipeline.Workspace)/**/*.nupkg;!$(Pipeline.Workspace)/**/*.symbols.nupkg'
nuGetFeedType: 'external'
publishFeedCredentials: 'NuGet.org'