Created
May 4, 2020 09:47
-
-
Save skolima/41ffa25efdde2bea303277979eb567d2 to your computer and use it in GitHub Desktop.
Publishing valid SourceLink via GitHub Actions: best practices Directory.Build.props
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Project> | |
<PropertyGroup> | |
<TreatWarningsAsErrors>true</TreatWarningsAsErrors> | |
<LangVersion>latest</LangVersion> | |
</PropertyGroup> | |
<!-- SourceLink starts here --> | |
<PropertyGroup> | |
<PublishRepositoryUrl>true</PublishRepositoryUrl> | |
<IncludeSymbols>true</IncludeSymbols> | |
<EmbedUntrackedSources>true</EmbedUntrackedSources> | |
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder> | |
</PropertyGroup> | |
<ItemGroup> | |
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/> | |
</ItemGroup> | |
<!-- Enable deterministic build for GitHub Actions --> | |
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'"> | |
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild> | |
</PropertyGroup> | |
<!-- See https://github.com/dotnet/sourcelink/issues/572 --> | |
<!-- Should not be needed when SDK >= 3.1.300 --> | |
<PropertyGroup> | |
<TargetFrameworkMonikerAssemblyAttributesPath>$([System.IO.Path]::Combine('$(IntermediateOutputPath)','$(TargetFrameworkMoniker).AssemblyAttributes$(DefaultLanguageSourceExtension)'))</TargetFrameworkMonikerAssemblyAttributesPath> | |
</PropertyGroup> | |
<ItemGroup> | |
<EmbeddedFiles Include="$(GeneratedAssemblyInfoFile)"/> | |
</ItemGroup> | |
</Project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment