dotnet-installer/build/publish/PublishNupkgToTransportFeed.targets

28 lines
1.4 KiB
Text
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BuildTasksFeedToolTargetsFileName>"$(NuGetPackagesDir)/microsoft.dotnet.build.tasks.feed/$(BuildTasksFeedToolVersion)/build/Microsoft.DotNet.Build.Tasks.Feed.targets"</BuildTasksFeedToolTargetsFileName>
</PropertyGroup>
<Import Condition="Exists('$(BuildTasksFeedToolTargetsFileName)')" Project="$(BuildTasksFeedToolTargetsFileName)" />
<ItemGroup>
<NupkgsForPublishing Include="$(PackagesDirectory)/Microsoft.DotNet.Cli.Utils.*.nupkg" />
<NupkgsForPublishing Include="$(PackagesDirectory)/Microsoft.DotNet.MSBuildSdkResolver.*.nupkg" />
</ItemGroup>
<PropertyGroup>
<ExpectedFeedUrl>https://dotnetfeed.blob.core.windows.net/$(TransportFeedContainerName)/index.json</ExpectedFeedUrl>
</PropertyGroup>
<Target Name="PublishNupkgToTransportFeed" Condition=" '$(PUBLISH_NUPKG_TO_TRANSPORT_FEED)' == 'true' AND '$(OS)' == 'Windows_NT' And '$(Architecture)' == 'x64' " >
<Error Condition="'$(TransportFeedCloudDropAccessToken)' == ''" Text="Missing property TransportFeedCloudDropAccessToken." />
<Message Text="Publish NuPkgs to Transport feed started" />
<PushToBlobFeed AccountKey="$(TransportFeedCloudDropAccessToken)"
ExpectedFeedUrl="$(ExpectedFeedUrl)"
ItemsToPush="@(NupkgsForPublishing)"
Overwrite="false" />
</Target>
</Project>