Skip to content

Commit f5ea157

Browse files
authored
Merge pull request #2 from polyadic/no-local-pack
2 parents 0544365 + 3737979 commit f5ea157

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Target Name="_PolyadicCodeStylePreventLocalPack" BeforeTargets="Pack" Condition="'$(ContinuousIntegrationBuild)' != 'true' And '$(IsPackable)' == 'true'">
4+
<PropertyGroup>
5+
<_WorkflowUrl>$(PackageProjectUrl)/actions?query=branch%253Amain</_WorkflowUrl>
6+
<_LinkPrefix>%1b]8;;</_LinkPrefix>
7+
<_LinkInfix>%1b\</_LinkInfix>
8+
<_LinkSuffix>$(_LinkPrefix)$(_LinkInfix)</_LinkSuffix>
9+
</PropertyGroup>
10+
<Error Text="Do not publish locally built packages to NuGet.org.
11+
Download the artifacts $(_LinkPrefix)$(_WorkflowUrl)$(_LinkInfix)published on GitHub Actions$(_LinkSuffix) instead.
12+
You can alternatively run `dotnet pack /p:ContinuousIntegrationBuild=true`." />
13+
</Target>
14+
</Project>

0 commit comments

Comments
 (0)