@@ -25,12 +25,40 @@ steps:
25
25
inputs :
26
26
command : ' pack'
27
27
packagesToPack : ' Microsoft.Azure.IoT.Edge.Module.nuspec'
28
+ packDestination : ' $(Build.ArtifactStagingDirectory)'
28
29
versioningScheme : ' off'
29
30
30
31
- task : AzureArtifacts.manifest-generator-task.manifest-generator-task.ManifestGeneratorTask@0
31
32
displayName : ' SBOM Generation Task'
32
33
inputs :
33
34
BuildDropPath : ' $(Build.ArtifactStagingDirectory)'
35
+
36
+ - task : EsrpCodeSigning@1
37
+ inputs :
38
+ ConnectedServiceName : ' Templates-Azure-IoT-Edge Sign'
39
+ FolderPath : ' $(Build.ArtifactStagingDirectory)'
40
+ Pattern : ' *.nupkg'
41
+ signConfigType : ' inlineSignParams'
42
+ inlineOperation : |
43
+ [
44
+ {
45
+ "keyCode": "CP-401405",
46
+ "operationSetCode": "NuGetSign",
47
+ "parameters": [ ],
48
+ "toolName": "sign",
49
+ "toolVersion": "1.0"
50
+ },
51
+ {
52
+ "keyCode": "CP-401405",
53
+ "operationSetCode": "NuGetVerify",
54
+ "parameters": [ ],
55
+ "toolName": "sign",
56
+ "toolVersion": "1.0"
57
+ }
58
+ ]
59
+ SessionTimeout : ' 20'
60
+ MaxConcurrency : ' 50'
61
+ MaxRetryAttempts : ' 5'
34
62
35
63
- task : PublishBuildArtifacts@1
36
64
inputs :
@@ -48,5 +76,20 @@ steps:
48
76
tagSource : ' manual'
49
77
tag : ' $(Build.SourceBranch)'
50
78
releaseNotesSource : ' input'
51
- isPreRelease : false
52
- addChangeLog : false
79
+ assets : ' $(Build.ArtifactStagingDirectory)/*.nupkg'
80
+ addChangeLog : false
81
+
82
+ - task : Bash@3
83
+ condition : and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
84
+ displayName : " nuget Publishing"
85
+ inputs :
86
+ targetType : ' inline'
87
+ script : |
88
+ echo $(Build.SourceBranch)
89
+ if [[ $(Build.SourceBranch) =~ ^refs/tags/v?[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
90
+ echo "starting NuGet Push"
91
+ nuget push *.nupkg $(apikey) -Source https://api.nuget.org/v3/index.json
92
+ else
93
+ echo "skipping NuGet Push"
94
+ fi
95
+ workingDirectory : ' $(Build.ArtifactStagingDirectory)'
0 commit comments