-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathazure-pipelines.yaml
89 lines (86 loc) · 3.18 KB
/
azure-pipelines.yaml
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
86
trigger:
- master
- refs/tags/*
stages:
- stage: Build
displayName: "build artifacts"
jobs:
- job: WindowsBuild
pool:
vmImage: windows-2019
displayName: Windows Build
steps:
- task: UseDotNet@2
inputs:
version: "3.1.x"
packageType: sdk
displayName: "Enabling dotnet core sdk 3.1"
- task: UseDotNet@2
inputs:
version: "6.0.x"
packageType: sdk
displayName: "Enabling dotnet core sdk 6.0"
- script: dotnet tool restore
displayName: restoring local tool
- script: dotnet tool run dotnet-cake build.cake -- -Configuration=Release
displayName: build project
- task: CopyFiles@2
inputs:
sourceFolder: PooledStream/bin/Release
contents: "**/*.nupkg"
targetFolder: "$(Build.ArtifactStagingDirectory)/nupkg"
displayName: "copying build nupkg to staging directory"
- task: PublishBuildArtifacts@1
inputs:
artifactName: "release_nupkg"
pathToPublish: "$(Build.ArtifactStagingDirectory)/nupkg"
displayName: publishing artifacts
- task: CopyFiles@2
inputs:
sourceFolder: PooledStream/bin/Release
contents: "**/*.snupkg"
targetFolder: "$(Build.ArtifactStagingDirectory)/snupkg"
displayName: "copying snupkg to staging directory"
- task: PublishBuildArtifacts@1
inputs:
artifactName: "release_snupkg"
pathToPublish: "$(Build.ArtifactStagingDirectory)/snupkg"
displayName: publishing symbol package artifacts
- stage: Publish
displayName: "release artifacts"
condition: "startsWith(variables['Build.SourceBranch'], 'refs/tags/')"
jobs:
- job: PublishToNuGet
pool:
vmImage: windows-2019
displayName: "Publish to nuget.org and github"
steps:
- task: NuGetToolInstaller@0
displayName: enable nuget-5.3.1
inputs:
versionSpec: "5.3.1"
- task: DownloadPipelineArtifact@2
displayName: download nupkg artifacts
inputs:
artifact: release_nupkg
path: "$(Build.ArtifactStagingDirectory)"
- task: DownloadPipelineArtifact@2
displayName: download snupkg artifacts
inputs:
artifact: release_snupkg
path: "$(Build.ArtifactStagingDirectory)"
- task: GitHubRelease@0
displayName: "releasing github"
inputs:
gitHubConnection: "pooledstream-token"
action: create
target: "$(Build.SourceVersion)"
assets: "$(Build.ArtifactStagingDirectory)/**/*"
isDraft: true
- task: NuGetCommand@2
displayName: "publishing nuget package"
inputs:
command: push
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg'
nuGetFeedType: external
publishFeedCredentials: 'pooledstream-nuget'