-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathado.yml
More file actions
92 lines (77 loc) · 2.44 KB
/
ado.yml
File metadata and controls
92 lines (77 loc) · 2.44 KB
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
88
89
90
91
92
name: '$(date:yyyyMMdd)$(rev:-rr)'
trigger:
batch: true
branches:
include:
- master
stages:
- stage: build_ci
displayName: "Building for CI"
dependsOn: []
jobs:
- job: Build
pool:
vmImage: 'windows-2019'
variables:
buildConfiguration: 'Release'
isPre: true
Major: 1
Minor: 0
Patch: $[counter(format('{0}.{1}', variables['Major'], variables['Minor']), 0)]
PackageVersionType: "" #"-preview-$(Build.BuildNumber)"
PackageVersion: $(Major).$(Minor).$(Patch)$(PackageVersionType)
steps:
#- task: NuGetToolInstaller@1
# inputs:
# versionSpec: 5.x
- task: UseDotNet@2
displayName: 'Use .NET Core sdk'
inputs:
useGlobalJson: true
- task: DotNetCoreCLI@2
inputs:
command: 'restore'
# - task: DotNetCoreCLI@2
# inputs:
# command: 'build'
# arguments: '--configuration $(buildConfiguration)'
# displayName: 'dotnet build $(buildConfiguration)'
- task: DotNetCoreCLI@2
inputs:
command: 'pack'
packagesToPack: 'src/*.csproj'
arguments: '--configuration $(buildConfiguration)'
versioningScheme: byEnvVar
versionEnvVar: PackageVersion
displayName: 'dotnet pack $(buildConfiguration)'
#- task: DotNetCoreCLI@2
# inputs:
# command: 'build'
# packagesToPack: 'generators/**/*.csproj'
# arguments: '--configuration $(buildConfiguration)'
# versioningScheme: byEnvVar
# versionEnvVar: PackageVersion
# displayName: 'dotnet build $(buildConfiguration)'
- task: DotNetCoreCLI@2
inputs:
command: 'pack'
packagesToPack: 'generators/**/*.csproj'
arguments: '--configuration $(buildConfiguration)'
versioningScheme: byEnvVar
versionEnvVar: PackageVersion
displayName: 'dotnet pack $(buildConfiguration)'
# Package a project
# - task: NuGetCommand@2
# inputs:
# command: 'pack'
# packagesToPack: '**/*.csproj'
# packDestination: '$(Build.ArtifactStagingDirectory)'
# versioningScheme: byEnvVar
# versionEnvVar: PackageVersion
- publish: $(Build.ArtifactStagingDirectory)
- task: NuGetCommand@2
inputs:
command: 'push'
packagesToPush: '$(Build.ArtifactStagingDirectory)/**/*.nupkg;!$(Build.ArtifactStagingDirectory)/**/*.symbols.nupkg'
nuGetFeedType: 'external'
publishFeedCredentials: 'nuget'