-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
64 lines (55 loc) · 1.6 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
name: $(date:yyyy.MM.dd)$(rev:.r)
trigger:
batch: true
branches:
include:
- main
paths:
include:
- /DaprStateQueryBuilder
- /DaprStateQueryBuilder.Tests
pool: AzureBuildServers
variables:
- name: BuildNumber
value: $(Build.BuildNumber)
- name: ProjectName
value: DaprStateQueryBuilder
steps:
- task: NuGetToolInstaller@1
displayName: 'Install NuGet tool'
inputs:
checkLatest: true
versionSpec: '>=6.7.0' # Latest versions at https://dist.nuget.org/tools.json
- task: DotNetCoreCLI@2
displayName: 'dotnet restore'
inputs:
command: 'restore'
projects: '**/Innovian.Contrib.Dapr.StateQueryBuilder.csproj'
feedsToUse: 'select'
vstsFeed: '4d1432f3-ac87-4104-a03a-bc658b00a9ea/0fb21d1f-6c0f-493f-9532-64eeda958e26'
noCache: true
- task: DotNetCoreCLI@2
displayName: 'dotnet build'
inputs:
command: 'build'
projects: '**/Innovian.Contrib.Dapr.StateQueryBuilder.csproj'
arguments: '--no-restore'
- task: DotNetCoreCLI@2
displayName: 'dotnet test'
inputs:
command: 'test'
projects: '**/Innovian.Contrib.Dapr.StateQueryBuilder.Tests.csproj'
- task: DotNetCoreCLI@2
displayName: 'dotnet pack'
inputs:
command: 'pack'
packagesToPack: '**/Innovian.Contrib.Dapr.StateQueryBuilder.csproj'
versioningScheme: 'byEnvVar'
versionEnvVar: 'BuildNumber'
- task: PowerShell@2
displayName: 'push to NuGet.org'
inputs:
targetType: 'inline'
script: 'nuget push "$(Build.ArtifactStagingDirectory)\*.nupkg" -ApiKey $(NuGetApiKey) -Source https://api.nuget.org/v3/index.json'
env:
NuGetApiKey: $(NuGetApiKey)