Skip to content

Commit 317a19f

Browse files
committed
Configures NuGet package creation and artifact handling
Improves NuGet package creation and artifact management by: - Adding 'artifacts' and 'nuget' folders to the build workflow's artifact paths to ensure proper packaging. - Appending a trailing slash to the local NuGet package source path in the integration tests to align with expected path format. - Modifying the integration tests project file to streamline package management and remove unnecessary project references, instead relying on published NuGet packages. - Adjusts the location of the Sigurn.Serialize.Generator.dll in the Sigurn.Serialize project to correctly package it as an analyzer.
1 parent 226d8e6 commit 317a19f

4 files changed

Lines changed: 7 additions & 12 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,5 @@ jobs:
5858
path: |
5959
**/bin/**
6060
**/obj/**
61+
**/artifacts/**
62+
**/nuget/**

src/Sigurn.Serialize.IntegrationTests/Sigurn.Serialize.IntegrationTests.csproj

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@
2929
</ItemGroup>
3030

3131
<ItemGroup>
32-
<ProjectReference Include="..\Sigurn.Serialize.Generator\Sigurn.Serialize.Generator.csproj" />
33-
<ProjectReference Include="..\Sigurn.Serialize\Sigurn.Serialize.csproj" />
32+
<Folder Include="nuget\" />
3433
</ItemGroup>
3534

3635
<Target Name="CreateArtifacts" BeforeTargets="Restore">
@@ -45,8 +44,4 @@
4544
Directories="$(RestorePackagesPath)\sigurn.serialize" />
4645
</Target>
4746

48-
<!--Target Name="CleanLocalNuGetCache" AfterTargets="Clean">
49-
<RemoveDir Condition="Exists('$(RestorePackagesPath)')"
50-
Directories="$(RestorePackagesPath)" />
51-
</Target-->
5247
</Project>

src/Sigurn.Serialize.IntegrationTests/nuget.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<packageSources>
44
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
55
<clear />
6-
<add key="local" value="../artifacts" />
6+
<add key="local" value="../artifacts/" />
77
<add key="nuget" value="https://api.nuget.org/v3/index.json" />
88
</packageSources>
99
</configuration>

src/Sigurn.Serialize/Sigurn.Serialize.csproj

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,11 @@
4040
<PublishRepositoryUrl>true</PublishRepositoryUrl>
4141
</PropertyGroup>
4242

43-
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
44-
<None Include="$(OutputPath)/Sigurn.Serialize.Generator.dll" Pack="true"
45-
PackagePath="analyzers/dotnet/cs" Visible="false" />
46-
<None Include="$(OutputPath)/Microsoft.Bcl.HashCode.dll" Pack="true"
43+
<ItemGroup>
44+
<None Include="../Sigurn.Serialize.Generator/bin/$(Configuration)/netstandard2.0/Sigurn.Serialize.Generator.dll" Pack="true"
4745
PackagePath="analyzers/dotnet/cs" Visible="false" />
4846
</ItemGroup>
49-
47+
5048
<Target Name="CreateArtifacts" BeforeTargets="Restore">
5149
<MakeDir Condition="!Exists('$(ArtifactsDestination)')"
5250
Directories="$(ArtifactsDestination)" />

0 commit comments

Comments
 (0)