Skip to content

Commit c002937

Browse files
Add MSBuild targets to enable pushing to NuGet feed
1 parent eb415b6 commit c002937

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

build/Push.targets

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<Project>
2+
<Target Name="Push" DependsOnTargets="_PushNuGet" />
3+
4+
<ItemGroup>
5+
<PackagesToPush Include="$(BuildDir)*.nupkg" />
6+
</ItemGroup>
7+
8+
<Target Name="_PushNuGet" Condition="@(PackagesToPush->Count()) != 0">
9+
<Error Text="Missing required property: NuGetPublishFeed" Condition=" '$(NuGetPublishFeed)' == '' "/>
10+
<PushNuGetPackages
11+
Packages="@(PackagesToPush)"
12+
Feed="$(NuGetPublishFeed)"
13+
ApiKey="$(APIKey)" />
14+
</Target>
15+
</Project>

build/repo.targets

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<Project>
2+
<Import Project="Push.targets" />
3+
</Project>

0 commit comments

Comments
 (0)