forked from davesmits/WebHooks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
webhooks.yaml
72 lines (64 loc) · 2.02 KB
/
webhooks.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
name: $(BuildId)
trigger:
- master
pr:
branches:
include:
- "*"
jobs:
################################################################################
- job: Linux
################################################################################
pool:
vmImage: ubuntu-20.04
variables:
BuildConfiguration: "Release"
Version: "6.0.$(Build.BuildId)"
DotNetSdkVersion: "6.0.100"
steps:
# Update .Net Core SDK
- task: DotNetCoreInstaller@2
displayName: 'Use .NET Core sdk $(DotNetSdkVersion)'
inputs:
version: $(DotNetSdkVersion)
# Dot Net Build
- task: DotNetCoreCLI@2
displayName: DotNetCoreCLI - Build Solution
inputs:
command: "build"
projects: "WebHooks.sln"
arguments: "--configuration $(BuildConfiguration)"
# Dot Net Test
- task: DotNetCoreCLI@2
displayName: DotNetCoreCLI - Run Tests
inputs:
command: "test"
projects: |
**/*.Tests.csproj
arguments: "--configuration $(BuildConfiguration)"
# Dot Net Pack Packages
- task: DotNetCoreCLI@2
displayName: DotNetCoreCLI - Pack Packages Nuget
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
inputs:
command: "pack"
searchPatternPack: "src/**/*.csproj"
outputDir: "$(Build.ArtifactStagingDirectory)/Webhooks"
versioningScheme: "byEnvVar"
versionEnvVar: "Version"
# Dot Net Push Packages
- task: NuGetCommand@2
displayName: "NuGet Push Packages Nuget"
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
inputs:
command: push
packagesToPush: "$(Build.ArtifactStagingDirectory)/Webhooks/*.nupkg"
publishVstsFeed: '58b77094-01c2-4df7-a763-c7b793b222e3'
# Publish Files
- task: PublishBuildArtifacts@1
displayName: PublishBuildArtifacts - Publish Files 'drop'
condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
inputs:
PathtoPublish: "$(build.artifactstagingdirectory)"
ArtifactName: "drop"
ArtifactType: "Container"