Skip to content

Commit d396ef3

Browse files
Xpl0itRSamboyCoding
authored andcommitted
Add NuGet packaging metadata and publish workflow
Add package metadata and SourceLink to plugin projects. Update CI workflow to add publish steps for each plugin NuGet package. Also set ContinuousIntegrationBuild in LibCpp2IL to ensure CI-specific packaging behaviour.
1 parent 653a683 commit d396ef3

7 files changed

Lines changed: 108 additions & 6 deletions

File tree

.github/workflows/dotnet-core.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
jobs:
1111
release-net9:
12-
strategy:
12+
strategy:
1313
matrix:
1414
runtimeIdentifier: [linux-x64, linux-arm64, osx-x64, osx-arm64, win-x64, win-arm64]
1515
project: [Cpp2IL]
@@ -31,9 +31,9 @@ jobs:
3131
with:
3232
script: |
3333
core.setOutput("extension", "${{ matrix.runtimeIdentifier }}" === "win-x64" ? ".exe" : "");
34-
34+
3535
let gitHash = "${{ steps.git-vars.outputs.git_hash }}";
36-
let runNumber = "${{ github.run_number }}";
36+
let runNumber = "${{ github.run_number }}";
3737
let rawGitRef = "${{ steps.git-vars.outputs.git_branch }}";
3838
console.log("rawGitRef: " + rawGitRef);
3939
let gitRef = rawGitRef.replace(/^refs\/heads\//, "");
@@ -91,7 +91,7 @@ jobs:
9191
with:
9292
script: |
9393
let gitHash = "${{ steps.git-vars.outputs.git_hash }}";
94-
let runNumber = "${{ github.run_number }}";
94+
let runNumber = "${{ github.run_number }}";
9595
let rawGitRef = "${{ steps.git-vars.outputs.git_branch }}";
9696
console.log("rawGitRef: " + rawGitRef);
9797
let gitRef = rawGitRef.replace(/^refs\/heads\//, "");
@@ -124,4 +124,19 @@ jobs:
124124
- name: Publish Cpp2IL.Core
125125
if: github.event_name == 'push'
126126
run: dotnet nuget push -s https://nuget.samboy.dev/v3/index.json -k ${{ secrets.NUGET_KEY }} ./Cpp2IL.Core/bin/Release/*.nupkg
127-
127+
- name: Publish Cpp2IL.Plugin.BuildReport
128+
if: github.event_name == 'push'
129+
run: dotnet nuget push -s https://nuget.samboy.dev/v3/index.json -k ${{ secrets.NUGET_KEY }} ./Cpp2IL.Plugin.BuildReport/bin/Release/*.nupkg
130+
- name: Publish Cpp2IL.Plugin.ControlFlowGraph
131+
if: github.event_name == 'push'
132+
run: dotnet nuget push -s https://nuget.samboy.dev/v3/index.json -k ${{ secrets.NUGET_KEY }} ./Cpp2IL.Plugin.ControlFlowGraph/bin/Release/*.nupkg
133+
- name: Publish Cpp2IL.Plugin.OrbisPkg
134+
if: github.event_name == 'push'
135+
run: dotnet nuget push -s https://nuget.samboy.dev/v3/index.json -k ${{ secrets.NUGET_KEY }} ./Cpp2IL.Plugin.OrbisPkg/bin/Release/*.nupkg
136+
- name: Publish Cpp2IL.Plugin.Pdb
137+
if: github.event_name == 'push'
138+
run: dotnet nuget push -s https://nuget.samboy.dev/v3/index.json -k ${{ secrets.NUGET_KEY }} ./Cpp2IL.Plugin.Pdb/bin/Release/*.nupkg
139+
- name: Publish Cpp2IL.Plugin.StrippedCodeRegSupport
140+
if: github.event_name == 'push'
141+
run: dotnet nuget push -s https://nuget.samboy.dev/v3/index.json -k ${{ secrets.NUGET_KEY }} ./Cpp2IL.Plugin.StrippedCodeRegSupport/bin/Release/*.nupkg
142+

Cpp2IL.Plugin.BuildReport/Cpp2IL.Plugin.BuildReport.csproj

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,20 @@
77
<DebugType>embedded</DebugType>
88
</PropertyGroup>
99

10+
<PropertyGroup>
11+
<Authors>Sam Byass (Samboy063)</Authors>
12+
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
13+
<Copyright>Copyright © Samboy063 2022-2025</Copyright>
14+
<Description>Plugin for Cpp2IL</Description>
15+
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
16+
<PackageId>Samboy063.$(MSBuildProjectName)</PackageId>
17+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
18+
<PackageProjectUrl>https://github.com/SamboyCoding/Cpp2IL</PackageProjectUrl>
19+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
20+
<Title>$(MSBuildProjectName)</Title>
21+
<VersionPrefix>2022.1.0</VersionPrefix>
22+
</PropertyGroup>
23+
1024
<ItemGroup>
1125
<ProjectReference Include="..\Cpp2IL.Core\Cpp2IL.Core.csproj">
1226
<PrivateAssets>all</PrivateAssets>
@@ -17,6 +31,7 @@
1731

1832
<ItemGroup>
1933
<PackageReference Include="System.Text.Json" Version="10.0.1" />
34+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="10.0.200" PrivateAssets="All" />
2035
</ItemGroup>
2136

2237
</Project>

Cpp2IL.Plugin.ControlFlowGraph/Cpp2IL.Plugin.ControlFlowGraph.csproj

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,28 @@
1010
<GenerateDependencyFile>false</GenerateDependencyFile>
1111
</PropertyGroup>
1212

13+
<PropertyGroup>
14+
<Authors>Sam Byass (Samboy063)</Authors>
15+
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
16+
<Copyright>Copyright © Samboy063 2024-2025</Copyright>
17+
<Description>Plugin for Cpp2IL</Description>
18+
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
19+
<PackageId>Samboy063.$(MSBuildProjectName)</PackageId>
20+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
21+
<PackageProjectUrl>https://github.com/SamboyCoding/Cpp2IL</PackageProjectUrl>
22+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
23+
<Title>$(MSBuildProjectName)</Title>
24+
<VersionPrefix>2022.1.0</VersionPrefix>
25+
</PropertyGroup>
26+
1327
<ItemGroup>
1428
<ProjectReference Include="..\Cpp2IL.Core\Cpp2IL.Core.csproj" ExcludeAssets="All" Private="false"/>
1529
<ProjectReference Include="..\LibCpp2IL\LibCpp2IL.csproj" ExcludeAssets="All" Private="false"/>
1630
</ItemGroup>
1731

1832
<ItemGroup>
1933
<PackageReference Include="DotNetGraph" Version="3.3.0" IncludeAssets="All" />
34+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="10.0.200" PrivateAssets="All" />
2035
</ItemGroup>
2136

2237
</Project>

Cpp2IL.Plugin.OrbisPkg/Cpp2IL.Plugin.OrbisPkg.csproj

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,24 @@
88
<DebugType>embedded</DebugType>
99
</PropertyGroup>
1010

11+
<PropertyGroup>
12+
<Authors>Sam Byass (Samboy063)</Authors>
13+
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
14+
<Copyright>Copyright © Samboy063 2022-2024</Copyright>
15+
<Description>Plugin for Cpp2IL</Description>
16+
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
17+
<PackageId>Samboy063.$(MSBuildProjectName)</PackageId>
18+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
19+
<PackageProjectUrl>https://github.com/SamboyCoding/Cpp2IL</PackageProjectUrl>
20+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
21+
<Title>$(MSBuildProjectName)</Title>
22+
<VersionPrefix>2022.1.0</VersionPrefix>
23+
</PropertyGroup>
24+
25+
<ItemGroup>
26+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="10.0.200" PrivateAssets="All" />
27+
</ItemGroup>
28+
1129
<ItemGroup>
1230
<ProjectReference Include="..\Cpp2IL.Core\Cpp2IL.Core.csproj" />
1331
</ItemGroup>

Cpp2IL.Plugin.Pdb/Cpp2IL.Plugin.Pdb.csproj

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,27 @@
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
8+
<DebugType>embedded</DebugType>
89
</PropertyGroup>
910

11+
<PropertyGroup>
12+
<Authors>Sam Byass (Samboy063)</Authors>
13+
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
14+
<Copyright>Copyright © Samboy063 2024</Copyright>
15+
<Description>Plugin for Cpp2IL</Description>
16+
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
17+
<PackageId>Samboy063.$(MSBuildProjectName)</PackageId>
18+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
19+
<PackageProjectUrl>https://github.com/SamboyCoding/Cpp2IL</PackageProjectUrl>
20+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
21+
<Title>$(MSBuildProjectName)</Title>
22+
<VersionPrefix>2022.1.0</VersionPrefix>
23+
</PropertyGroup>
24+
25+
<ItemGroup>
26+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="10.0.200" PrivateAssets="All" />
27+
</ItemGroup>
28+
1029
<ItemGroup>
1130
<ProjectReference Include="..\Cpp2IL.Core\Cpp2IL.Core.csproj" />
1231
</ItemGroup>

Cpp2IL.Plugin.StrippedCodeRegSupport/Cpp2IL.Plugin.StrippedCodeRegSupport.csproj

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,27 @@
44
<TargetFramework>net9.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
7+
<DebugType>embedded</DebugType>
78
</PropertyGroup>
8-
9+
10+
<PropertyGroup>
11+
<Authors>Sam Byass (Samboy063)</Authors>
12+
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
13+
<Copyright>Copyright © Samboy063 2023-2026</Copyright>
14+
<Description>Plugin for Cpp2IL</Description>
15+
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
16+
<PackageId>Samboy063.$(MSBuildProjectName)</PackageId>
17+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
18+
<PackageProjectUrl>https://github.com/SamboyCoding/Cpp2IL</PackageProjectUrl>
19+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
20+
<Title>$(MSBuildProjectName)</Title>
21+
<VersionPrefix>2022.1.0</VersionPrefix>
22+
</PropertyGroup>
23+
24+
<ItemGroup>
25+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="10.0.200" PrivateAssets="All" />
26+
</ItemGroup>
27+
928
<ItemGroup>
1029
<ProjectReference Include="..\Cpp2IL.Core\Cpp2IL.Core.csproj" />
1130
</ItemGroup>

LibCpp2IL/LibCpp2IL.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<Configurations>Debug;Release</Configurations>
2020
<TargetFrameworks>net9.0;net8.0;net7.0;net6.0;netstandard2.0</TargetFrameworks>
2121
<PolySharpIncludeRuntimeSupportedAttributes>true</PolySharpIncludeRuntimeSupportedAttributes>
22+
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
2223
</PropertyGroup>
2324

2425
<PropertyGroup Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">

0 commit comments

Comments
 (0)