Skip to content

Commit 40ccc13

Browse files
Determinstic build and sourcelink for nuget packages
1 parent d56c3f8 commit 40ccc13

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

.github/workflows/dotnet.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,13 @@ jobs:
3535
with:
3636
vs-version: '[16.6,)'
3737

38-
- name: Dotnet Build
39-
run: dotnet build DotNetBuildable.slnf /p:Platform=$env:BuildPlatform /p:Configuration=$env:BuildTarget
38+
- name: Dotnet deterministic Build
39+
run: dotnet build DotNetBuildable.slnf /p:Platform=$env:BuildPlatform /p:Configuration=$env:BuildTarget /p:ContinuousIntegrationBuild=true
4040

4141
- name: Dotnet Publish
4242
run: dotnet publish DotNetPublishable.slnf /p:Platform=$env:BuildPlatform /p:Configuration=$env:BuildTarget
4343

44-
- name: Pack multitargeted CodeConv
45-
run: dotnet pack CommandLine/CodeConv/CodeConv.csproj -c $env:BuildTarget
46-
47-
- name: Build Vsix (not yet compatible with dotnet process)
44+
- name: MSBuild Vsix
4845
run: msbuild Vsix\Vsix.csproj -restore /p:Configuration=$env:BuildTarget
4946

5047
- name: Execute unit tests

CodeConverter/CodeConverter.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<PackageTags>Convert Converter Conversion C# CSharp CS VB VB.NET Visual Basic Code Free Roslyn Tool</PackageTags>
2121
<PackageReleaseNotes>See https://github.com/icsharpcode/CodeConverter/blob/master/CHANGELOG.md </PackageReleaseNotes>
2222
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
23+
<EmbedUntrackedSources>$(ContinuousIntegrationBuild)</EmbedUntrackedSources>
2324
</PropertyGroup>
2425
<ItemGroup>
2526
<Compile Remove="Shared\DefaultReferences.cs" />

CommandLine/CodeConv/CodeConv.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ For a nugetted dll, web converter or visual studio extension, see https://github
1919
<RepositoryUrl>https://github.com/icsharpcode/CodeConverter/</RepositoryUrl>
2020
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
2121
<Nullable>enable</Nullable>
22+
<EmbedUntrackedSources>$(ContinuousIntegrationBuild)</EmbedUntrackedSources>
2223
</PropertyGroup>
2324

2425
<ItemGroup>
@@ -32,6 +33,10 @@ For a nugetted dll, web converter or visual studio extension, see https://github
3233
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.4.0" />
3334
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic.Workspaces" Version="3.4.0" />
3435
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="3.4.0" />
36+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0">
37+
<PrivateAssets>all</PrivateAssets>
38+
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
39+
</PackageReference>
3540
<PackageReference Include="Microsoft.VisualStudio.Threading" Version="16.6.13" />
3641
<PackageReference Include="Microsoft.Win32.Registry" Version="4.7.0" />
3742
<PackageReference Include="NuGet.Build.Tasks" Version="5.4.0" />

Directory.Build.props

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,4 @@
1111
<Copyright>Copyright (c) 2017-2021 AlphaSierraPapa for the CodeConverter team</Copyright>
1212
<Company>ICSharpCode</Company>
1313
</PropertyGroup>
14-
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
15-
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
16-
</PropertyGroup>
1714
</Project>

DotNetPublishable.slnf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
"solution": {
33
"path": "CodeConverter.sln",
44
"projects": [
5-
"CodeConverter\\CodeConverter.csproj",
65
"Func\\Func.csproj",
76
"Web\\Web.csproj"
87
]

0 commit comments

Comments
 (0)