-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yaml
87 lines (76 loc) · 3.3 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
87
parameters:
- name: previewRelease
type: boolean
default: true
- name: majorVersion
type: number
default: 0
- name: minorVersion
type: number
default: 0
- name: patchVersion
type: number
default: 0
trigger: none
pr:
branches:
include:
- main
variables:
majorVersion: ${{ parameters['majorVersion'] }}
minorVersion: ${{ parameters['minorVersion'] }}
patchVersion: ${{ parameters['patchVersion'] }}
shouldPublish: $[ eq(variables['Build.Reason'], 'Manual') ]
fullVersion: $[ format('{0}.{1}.{2}', variables['majorVersion'], variables['minorVersion'], variables['patchVersion']) ]
${{ if parameters['previewRelease'] }}:
releaseVersion: $[ format('{0}-{1}.{2}', variables['fullVersion'], 'preview', variables['Build.BuildId']) ]
${{ else }}:
releaseVersion: $[ format('{0}', variables['fullVersion']) ]
jobs:
- job: Extension
displayName: in-process and isolated NuGet packages
steps:
- task: UseDotNet@2
displayName: Install .NET SDK
inputs:
packageType: sdk
version: 8.x
performMultiLevelLookup: true
- task: DotNetCoreCLI@2
displayName: Build Akc.Azure.WebJobs.Extensions.ActiveMQ Release
inputs:
command: build
arguments: $(Build.SourcesDirectory)/src/ActiveMQBinding/ActiveMQBinding.csproj --configuration Release -property:Version=$(releaseVersion) -property:ContinuousIntegrationBuild=true
- task: DotNetCoreCLI@2
displayName: Build Akc.Azure.Functions.Worker.Extensions.ActiveMQ Release
inputs:
command: build
arguments: $(Build.SourcesDirectory)/src/ActiveMQ.WorkerBinding/ActiveMQ.WorkerBinding.csproj --configuration Release -property:Version=$(releaseVersion) -property:ContinuousIntegrationBuild=true
- task: DotNetCoreCLI@2
displayName: Pack Akc.Azure.WebJobs.Extensions.ActiveMQ Release
condition: eq(variables['shouldPublish'], 'True')
inputs:
command: custom
custom: pack
arguments: $(Build.SourcesDirectory)/src/ActiveMQBinding/ActiveMQBinding.csproj --configuration Release --no-build -property:Version=$(releaseVersion) --output $(Build.ArtifactStagingDirectory)/dotnet/$(releaseVersion)
- task: DotNetCoreCLI@2
displayName: Pack Akc.Azure.Functions.Worker.Extensions.ActiveMQ Release
condition: eq(variables['shouldPublish'], 'True')
inputs:
command: custom
custom: pack
arguments: $(Build.SourcesDirectory)/src/ActiveMQ.WorkerBinding/ActiveMQ.WorkerBinding.csproj --configuration Release --no-build -property:Version=$(releaseVersion) --output $(Build.ArtifactStagingDirectory)/dotnet/$(releaseVersion)
- task: PublishBuildArtifacts@1
displayName: Publish Extension
condition: eq(variables['shouldPublish'], 'True')
inputs:
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
artifactName: 'drop'
- task: NuGetCommand@2
displayName: 'NuGet push packages'
condition: eq(variables['shouldPublish'], 'True')
inputs:
command: push
nuGetFeedType: external
publishFeedCredentials: nuget.org
packagesToPush: '$(Build.ArtifactStagingDirectory)/dotnet/$(releaseVersion)/*.nupkg'