Skip to content

Commit 79a360e

Browse files
Strong name signing
1 parent 2026ad6 commit 79a360e

File tree

6 files changed

+30
-19
lines changed

6 files changed

+30
-19
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,10 @@ jobs:
4646

4747
- name: Publish to NuGet
4848
if: github.event_name == 'push'
49-
run: |
49+
run: |
5050
if ( "${{github.ref}}" -match "^refs/tags/v[0-9]+\.[0-9]+\.[0-9]+$" ) {
51-
dotnet nuget push build\packages\**\*.nupkg -s nuget.org -k ${{secrets.NUGET_TOKEN}} --no-symbols true
51+
dotnet nuget push build\packages\**\*.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_TOKEN}}
52+
dotnet nuget push build\packages\**\*.snupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_TOKEN}}
5253
} else {
5354
echo "publish is only enabled by tagging with a release tag"
5455
}

src/Directory.Build.props

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
<LangVersion>9.0</LangVersion>
99
<Nullable>enable</Nullable>
1010

11-
<DebugType>embedded</DebugType>
12-
1311
<GenerateDocumentationFile>true</GenerateDocumentationFile>
1412
<NoWarn>CS1591;CS1701</NoWarn>
1513

@@ -20,24 +18,28 @@
2018
<PackageLicenseExpression>MIT</PackageLicenseExpression>
2119
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
2220
<PackageProjectUrl>https://github.com/amerkoleci/Vortice.Mathematics</PackageProjectUrl>
23-
</PropertyGroup>
2421

25-
<PropertyGroup>
22+
<IncludeSymbols>true</IncludeSymbols>
23+
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
2624
<PublishRepositoryUrl>true</PublishRepositoryUrl>
2725
<EmbedUntrackedSources>true</EmbedUntrackedSources>
28-
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
29-
</PropertyGroup>
26+
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
3027

31-
<PropertyGroup Condition="'$(TF_BUILD)' == 'true'">
32-
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
33-
</PropertyGroup>
28+
<SignAssembly Condition="'$(SignAssembly)' == ''">true</SignAssembly>
29+
<VorticePublicKey>0024000004800000940000000602000000240000525341310004000001000100758064dc2d7cc685f393036f2d5fd6c3a8d9a811a6633e614a2a224c0aa45ef6e7dd9a45172f3b0055f0af31e7637b152a02263922c9fdfd0ed4408d30dcc26fc080c9d0e4c5e1307527e661037b4927b9f27b5318307698d474bf15506f21b9b2cf8155855624863b46584c11bf75bfde5dbbe8120c00524f713541725167cb</VorticePublicKey>
30+
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)Vortice.snk</AssemblyOriginatorKeyFile>
3431

35-
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
36-
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
32+
<!-- Packages versions -->
33+
<NerdbankGitVersioningVersion>3.3.37</NerdbankGitVersioningVersion>
34+
<GitHubSourceLinkVersion>1.1.0-beta-20204-02</GitHubSourceLinkVersion>
3735
</PropertyGroup>
3836

3937
<ItemGroup>
40-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
41-
<PackageReference Include="Nerdbank.GitVersioning" Version="3.3.37" PrivateAssets="All" />
38+
<PackageReference Include="Nerdbank.GitVersioning" Version="$(NerdbankGitVersioningVersion)" PrivateAssets="All" />
39+
40+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="$(GitHubSourceLinkVersion)">
41+
<PrivateAssets>all</PrivateAssets>
42+
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
43+
</PackageReference>
4244
</ItemGroup>
4345
</Project>

src/Directory.Build.targets

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

src/Vortice.Mathematics/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/Vortice.Mathematics/Vortice.Mathematics.csproj

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@
77

88
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
99
<PackageReference Include="System.Numerics.Vectors" Version="4.5.0" />
10-
<PackageReference Include="Microsoft.Bcl.HashCode " Version="1.1.0" />
10+
<PackageReference Include="Microsoft.Bcl.HashCode" Version="1.1.1" />
11+
</ItemGroup>
12+
13+
<ItemGroup>
14+
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute">
15+
<_Parameter1>Vortice.Mathematics.PackedVector, PublicKey=$(VorticePublicKey)</_Parameter1>
16+
</AssemblyAttribute>
1117
</ItemGroup>
1218

1319
</Project>

src/Vortice.snk

596 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)