-
Notifications
You must be signed in to change notification settings - Fork 5
/
build-nuget.yaml
49 lines (41 loc) · 1.08 KB
/
build-nuget.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
variables:
project: './UMAP/UMAP.csproj'
buildConfiguration: 'Release'
trigger:
- master
pool:
vmImage: 'windows-latest'
steps:
- task: NuGetToolInstaller@1
- task: UseDotNet@2
displayName: 'Use .NET 7.0 SDK'
inputs:
packageType: sdk
version: 7.x
includePreviewVersions: false
installationPath: $(Agent.ToolsDirectory)\dotnet
- task: DotNetCoreCLI@2
inputs:
command: 'restore'
projects: '$(project)'
displayName: 'restore nuget'
- task: DotNetCoreCLI@2
inputs:
command: 'build'
projects: '$(project)'
arguments: '-c $(buildConfiguration) /p:Version=1.0.$(build.buildId) /p:LangVersion=latest'
- task: DotNetCoreCLI@2
inputs:
command: 'pack'
packagesToPack: '$(project)'
versioningScheme: 'off'
configuration: '$(buildConfiguration)'
buildProperties: 'Version="1.0.$(build.buildId)";LangVersion="latest"'
nobuild: true
- task: NuGetCommand@2
inputs:
command: 'push'
packagesToPush: '**/*.nupkg'
nuGetFeedType: 'external'
publishFeedCredentials: 'nuget-curiosity-org'
displayName: 'push nuget'