Skip to content

Commit

Permalink
Add package metadata, sourcelink, inline docs, debug symbols, enable …
Browse files Browse the repository at this point in the history
…reproducible builds (#32)
  • Loading branch information
Tyrrrz authored Sep 21, 2023
1 parent ac5a9d9 commit 49c64a1
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ indent_style = space
[*.xml]
indent_size = 2

# Props/targets/Csproj/fsproj/vbproj files
[*.{props,targets,csproj,fsproj,vbproj}]
indent_size = 2

# C# files
[*.cs]

Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,7 @@ jobs:
dotnet pack
--no-build
--configuration Release
--version-suffix "ci-${{ env.CLEAN_BRANCH_NAME }}-${{ github.run_id }}"
env:
CLEAN_BRANCH_NAME: ${{needs.build-dotnet.outputs.clean_name}}
--version-suffix "ci-${{ needs.build-dotnet.outputs.clean_name }}-${{ github.run_id }}"
- name: Publish NuGet Packages
run: >
Expand Down
11 changes: 9 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
<Project>
<!-- See https://aka.ms/dotnet/msbuild/customize for more details on customizing your build -->

<PropertyGroup>
<CurrentPreviewTfm>net8.0</CurrentPreviewTfm>
<!--<IncludePreview>true</IncludePreview>-->
<IncludePreview Condition="'$(IncludePreview)' == ''">false</IncludePreview>
<ContinuousIntegrationBuild Condition="'$(CI)' == 'true'">true</ContinuousIntegrationBuild>
</PropertyGroup>

<PropertyGroup>
<LangVersion>latest</LangVersion>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<WarningsAsErrors>nullable</WarningsAsErrors>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>

<PropertyGroup>
Expand All @@ -25,4 +31,5 @@
-->
<Using Remove="System.Net.Http" />
</ItemGroup>

</Project>
13 changes: 11 additions & 2 deletions src/Passwordless/Passwordless.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,23 @@
<PropertyGroup>
<TargetFrameworks>net462;net6.0;net7.0;netstandard2.0</TargetFrameworks>
<TargetFrameworks Condition="'$(IncludePreview)' == 'true'">$(TargetFrameworks);$(CurrentPreviewTfm)</TargetFrameworks>
<IsPackable>true</IsPackable>
<PublishAot Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp' AND $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '8.0'))">true</PublishAot>
</PropertyGroup>

<!-- Packaging-related properties -->
<PropertyGroup>
<Authors>Bitwarden</Authors>
<RepositoryUrl>https://github.com/passwordless/passwordless-dotnet</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<Description>The official Bitwarden Passwordless.dev .NET library</Description>
<PackageProjectUrl>https://github.com/passwordless/passwordless-dotnet</PackageProjectUrl>
<PackageReleaseNotes>https://github.com/passwordless/passwordless-dotnet/releases</PackageReleaseNotes>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageReadmeFile>README.md</PackageReadmeFile>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<DebugType>embedded</DebugType>
</PropertyGroup>

<!-- .NET 6 first introduced these types, for all others we include our own pollyfill so that it builds -->
Expand All @@ -22,6 +30,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Options" Version="7.0.1" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="all" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
Expand Down

0 comments on commit 49c64a1

Please sign in to comment.