-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcd-PlacePopularity.yml
More file actions
85 lines (71 loc) · 2.25 KB
/
cd-PlacePopularity.yml
File metadata and controls
85 lines (71 loc) · 2.25 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
76
77
78
79
80
81
82
83
84
85
# set the version numbering, this results in 0.0.1 for the first build incrementing that way.
name: 0.1$(rev:.r)
trigger:
branches:
include:
- release
paths:
exclude:
- readme.md
- ci-customcontrols.yml
- cd-customcontrols.yml
stages:
- stage: 'Build'
jobs:
- job:
pool:
vmImage: 'windows-latest'
demands: msbuild
workspace:
clean: all
steps:
- task: NuGetToolInstaller@0
displayName: 'Use NuGet 4.9.3'
inputs:
versionSpec: 4.9.3
- task: NuGetCommand@2
displayName: 'NuGet restore'
inputs:
restoreSolution: '*.sln'
- task: MSBuild@1
displayName: 'Build beta'
inputs:
solution: src/PlacePopularity.csproj
msbuildArguments: '/t:restore;build;pack /p:PackageVersion=$(Build.BuildNumber)-beta /p:PackageOutputPath=$(build.artifactstagingdirectory)/beta /p:AssemblyFileVersion=$(Build.BuildNumber) '
clean: true
- task: MSBuild@1
displayName: 'Build final'
inputs:
solution: src/PlacePopularity.csproj
msbuildArguments: '/t:restore;build;pack /p:PackageVersion=$(Build.BuildNumber) /p:PackageOutputPath=$(build.artifactstagingdirectory)/final /p:AssemblyFileVersion=$(Build.BuildNumber) '
clean: true
- task: CopyFiles@2
displayName: 'Copy Files to: $(build.artifactstagingdirectory)'
inputs:
SourceFolder: '$(build.sourcesdirectory)'
Contents: '**\bin\$(BuildConfiguration)\**\*.nupkg'
TargetFolder: '$(build.artifactstagingdirectory)'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
- stage: 'PublishNuGetPackage'
displayName: 'Publish Release NuGet Package'
dependsOn: 'Build'
condition: succeeded()
jobs:
- deployment:
pool:
vmImage: 'ubuntu-latest'
environment: 'nuget-org'
strategy:
runOnce:
deploy:
steps:
- download: current
artifact: 'drop'
- task: NuGetCommand@2
displayName: 'Push NuGet Package'
inputs:
command: 'push'
packagesToPush: '$(Pipeline.Workspace)/drop/final/*.nupkg'
nuGetFeedType: 'external'
publishFeedCredentials: 'NuGet'