forked from gbryniarski/AzureEventHubAppender
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
77 lines (63 loc) · 1.89 KB
/
azure-pipelines.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
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
trigger:
- master
pool:
vmImage: 'windows-latest'
variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'
majorVersion : 1
minorVersion : 3
patchVersion : 2
steps:
- task: UseDotNet@2
inputs:
packageType: 'sdk'
version: '3.1.100'
- task: UseDotNet@2
inputs:
packageType: 'sdk'
version: '5.0.100'
- task: NuGetToolInstaller@1
inputs:
checkLatest: true
- task: DotNetCoreCLI@2
displayName: Restore NuGet packages
inputs:
command: restore
projects: '**/*.csproj'
- task: DotNetCoreCLI@2
displayName: Build projects
inputs:
projects: '**/*.csproj'
arguments: '--configuration $(BuildConfiguration) -f netcoreapp3.1'
- task: DotNetCoreCLI@2
displayName: Build projects
inputs:
projects: '**/*.csproj'
arguments: '--configuration $(BuildConfiguration) -f net5.0'
# - task: DotNetCoreCLI@2
# displayName: Run unit tests
# inputs:
# command: test
# projects: '**/*.csproj'
#- task: DotNetCoreCLI@2
# displayName: "Create NuGet Packages"
# inputs:
# command: 'pack'
# packagesToPack: '**/*.csproj;!**/*.Tests.csproj'
# versioningScheme: 'byPrereleaseNumber'
# majorVersion: $(majorVersion)
# minorVersion: $(minorVersion)
# patchVersion: $(patchVersion)
- task: CmdLine@2
displayName: "Create NuGet Package"
inputs:
script: dotnet pack ./AzureEventHubAppender/AzureEventHubAppender.csproj /p:Version=$(majorVersion).$(minorVersion).$(patchVersion) --configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory)
- task: NuGetCommand@2
displayName: "Push NuGet package to artifact repository"
inputs:
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg'
nuGetFeedType: 'internal'
publishVstsFeed: '13893109-2090-413a-87d0-9539cabbfcad/9d117720-4777-425f-a00e-9b010a51c6e2'