Skip to content

Commit bd35dd6

Browse files
authored
feat: Add SourceLink and push symbols to NuGet.org (#825)
Co-authored-by: RomainHautefeuille: #806 Create and publish symbol packages (.snupkg) with Source Link. Source Link documentation: https://devblogs.microsoft.com/dotnet/producing-packages-with-source-link/ https://github.com/dotnet/sourcelink ContinuousIntegrationBuild is set during CI to avoid linking to paths from build vm, but not when built manually where local paths are relevant.
1 parent b23df82 commit bd35dd6

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/Algolia.Search/Algolia.Search.csproj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,15 @@
2323
<GenerateDocumentationFile>true</GenerateDocumentationFile>
2424
<TargetFrameworks>netstandard2.1;netstandard2.0;netstandard1.3</TargetFrameworks>
2525
<LangVersion>7.3</LangVersion>
26+
<IncludeSymbols>true</IncludeSymbols>
27+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
28+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
2629
</PropertyGroup>
2730
<ItemGroup>
31+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1">
32+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
33+
<PrivateAssets>all</PrivateAssets>
34+
</PackageReference>
2835
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
2936
<None Include="images\icon.png" Pack="true" PackagePath="\" />
3037
</ItemGroup>

src/Directory.Build.props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<Project>
2+
<PropertyGroup Condition="'$(CI)' == 'true'">
3+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
4+
</PropertyGroup>
5+
</Project>

0 commit comments

Comments
 (0)