Skip to content

Commit e68b2a5

Browse files
author
Bart Koelman
committed
Produce NuGet package in cibuild
This lets each project opt-in for producing a NuGet package, instead of listing them globally
1 parent 61649e6 commit e68b2a5

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

Build.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ function CreateNuGetPackage {
8585
}
8686

8787
if ([string]::IsNullOrWhitespace($versionSuffix)) {
88-
dotnet pack .\src\JsonApiDotNetCore -c Release -o .\artifacts
88+
dotnet pack --no-restore --no-build --configuration Release --output .\artifacts
8989
}
9090
else {
91-
dotnet pack .\src\JsonApiDotNetCore -c Release -o .\artifacts --version-suffix=$versionSuffix
91+
dotnet pack --no-restore --no-build --configuration Release --output .\artifacts --version-suffix=$versionSuffix
9292
}
9393

9494
CheckLastExitCode

Directory.Build.props

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)CodingGuidelines.ruleset</CodeAnalysisRuleSet>
1111
<WarningLevel>9999</WarningLevel>
1212
<Nullable>enable</Nullable>
13+
<IsPackable>false</IsPackable>
14+
<WarnOnPackingNonPackableProject>false</WarnOnPackingNonPackableProject>
1315
</PropertyGroup>
1416

1517
<ItemGroup>

src/JsonApiDotNetCore.SourceGenerators/JsonApiDotNetCore.SourceGenerators.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<PropertyGroup>
33
<VersionPrefix>$(JsonApiDotNetCoreVersionPrefix)</VersionPrefix>
44
<TargetFramework>netstandard2.0</TargetFramework>
5+
<IsPackable>true</IsPackable>
56
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
67
<IncludeBuildOutput>false</IncludeBuildOutput>
78
<NoWarn>$(NoWarn);NU5128</NoWarn>

src/JsonApiDotNetCore/JsonApiDotNetCore.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<PropertyGroup>
33
<VersionPrefix>$(JsonApiDotNetCoreVersionPrefix)</VersionPrefix>
44
<TargetFramework>$(NetCoreAppVersion)</TargetFramework>
5+
<IsPackable>true</IsPackable>
56
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
67
</PropertyGroup>
78

0 commit comments

Comments
 (0)