-
Notifications
You must be signed in to change notification settings - Fork 329
Expand file tree
/
Copy pathcompound-nuget-pack-step.yml
More file actions
74 lines (66 loc) · 2.64 KB
/
compound-nuget-pack-step.yml
File metadata and controls
74 lines (66 loc) · 2.64 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
#################################################################################
# Licensed to the .NET Foundation under one or more agreements. #
# The .NET Foundation licenses this file to you under the MIT license. #
# See the LICENSE file in the project root for more information. #
#################################################################################
parameters:
- name: buildConfiguration
type: string
- name: generateSymbolsPackage
type: boolean
- name: packageVersion
type: string
- name: nuspecPath
type: string
- name: outputDirectory
type: string
- name: referenceType
type: string
values:
- Package
- Project
steps:
# This tool is failing on OneBranch pipelines, possibly due to new
# network isolation rules:
#
# ERR:Client network socket disconnected before secure TLS connection was established
#
# Our AKV Official build uses this 1ES image:
#
# Image: 1ES-OB-2022-D8-Netlock-V2_westus2_1_image
#
# An ICM for this issue exists:
#
# https://portal.microsofticm.com/imp/v5/incidents/details/690355343/summary
#
# Recommendation is to remove this step since NuGet is already present on
# the 1ES images.
#
# - task: NuGetToolInstaller@1
# displayName: 'Install Latest Nuget'
# inputs:
# checkLatest: true
- ${{ if parameters.generateSymbolsPackage }}:
- task: NuGetCommand@2
displayName: 'Generate NuGet Package and Symbols Package'
inputs:
command: custom
arguments: >-
pack
${{ parameters.nuspecPath }}
-Symbols
-SymbolPackageFormat snupkg
-Version ${{ parameters.packageVersion }}
-OutputDirectory ${{ parameters.outputDirectory }}
-Properties "COMMITID=$(Build.SourceVersion);Configuration=${{ parameters.buildConfiguration }};ReferenceType=${{ parameters.referenceType }}"
- ${{ else }}:
- task: NuGetCommand@2
displayName: 'Generate NuGet Package'
inputs:
command: custom
arguments: >-
pack
${{ parameters.nuspecPath }}
-Version ${{ parameters.packageVersion }}
-OutputDirectory ${{ parameters.outputDirectory }}
-Properties "COMMITID=$(Build.SourceVersion);Configuration=${{ parameters.buildConfiguration }};ReferenceType=${{ parameters.referenceType }}"