@@ -189,6 +189,7 @@ phases:
189
189
variables :
190
190
BuildConfig : Release
191
191
OfficialBuildId : $(BUILD.BUILDNUMBER)
192
+ DotnetVersionKind : $[variables.VERSIONKIND] # If no "VERSIONKIND" variable is set when queuing the publishing task, this defaults to empty string.
192
193
DOTNET_CLI_TELEMETRY_OPTOUT : 1
193
194
DOTNET_SKIP_FIRST_TIME_EXPERIENCE : 1
194
195
DOTNET_MULTILEVEL_LOOKUP : 0
@@ -230,33 +231,42 @@ phases:
230
231
sourceFolder : $(Build.SourcesDirectory)/artifacts/pkgassets/PackageAssets
231
232
targetFolder : $(Build.SourcesDirectory)/artifacts/pkgassets
232
233
233
- - script : ./build.cmd -pack -configuration $(BuildConfig)
234
+ # Depending on the value of DotNetFinalVersionKind, the name of the package will change.
235
+ # For our nightly builds we want it to be empty, and when creating the official nugets, we want it to be "release"
236
+ # the value of the version kind is set when queuing the publishing job on AzureDevOps by adding a VERSIONKIND variable
237
+ # See more info in: https://github.com/dotnet/arcade/blob/master/Documentation/CorePackages/Versioning.md#package-version
238
+ - script : ./build.cmd -configuration $(BuildConfig) -pack -ci /p:OfficialBuildId=$(OfficialBuildId) /p:DotNetFinalVersionKind=$(DotnetVersionKind) /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages
234
239
displayName : Build Packages
235
240
236
- - script : ./sign.cmd /p:SignNugetPackages=true
241
+ - script : ./sign.cmd /p:SignNugetPackages=true /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages
237
242
displayName : sign packages
238
243
continueOnError : false
239
244
240
245
- task : NuGetAuthenticate@0
241
246
inputs :
242
247
nuGetServiceConnections : machinelearning-dnceng-public-feed # To allow publishing to a feed of another organization
243
248
244
- - script : $(Build.SourcesDirectory)\.dotnet\dotnet.exe msbuild build\publish.proj /t:PublishPackages /p:NuGetFeedUrl=$(_AzureDevopsFeedUrl) /p:NuGetApiKey=AzureArtifacts
245
- displayName : Publish Packages to AzureDevOps Feed
249
+ - task : NuGetCommand@2
250
+ displayName : Push packages to AzureDevOps feed
251
+ inputs :
252
+ command : push
253
+ packagesToPush : $(Build.SourcesDirectory)/artifacts/**/*.nupkg;!$(Build.SourcesDirectory)/artifacts/**/*.snupkg
254
+ nuGetFeedType : external
255
+ publishFeedCredentials : machinelearning-dnceng-public-feed
246
256
247
257
- task : MSBuild@1
248
258
displayName : Publish Symbols to SymWeb Symbol Server
249
259
inputs :
250
260
solution : build/publish.proj
251
- msbuildArguments : /t:PublishSymbolPackages /p:SymbolServerPath=$(_SymwebSymbolServerPath) /p:SymbolServerPAT=$(SymwebSymbolServerPAT)
261
+ msbuildArguments : /t:PublishSymbolPackages /p:SymbolServerPath=$(_SymwebSymbolServerPath) /p:SymbolServerPAT=$(SymwebSymbolServerPAT) /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages
252
262
msbuildVersion : 15.0
253
263
continueOnError : true
254
264
255
265
- task : MSBuild@1
256
266
displayName : Publish Symbols to Msdl Symbol Server
257
267
inputs :
258
268
solution : build/publish.proj
259
- msbuildArguments : /t:PublishSymbolPackages /p:SymbolServerPath=$(_MsdlSymbolServerPath) /p:SymbolServerPAT=$(MsdlSymbolServerPAT)
269
+ msbuildArguments : /t:PublishSymbolPackages /p:SymbolServerPath=$(_MsdlSymbolServerPath) /p:SymbolServerPAT=$(MsdlSymbolServerPAT) /p:RestorePackagesPath=$(Build.SourcesDirectory)\packages /p:NUGET_PACKAGES=$(Build.SourcesDirectory)\packages
260
270
msbuildVersion : 15.0
261
271
continueOnError : true
262
272
0 commit comments