Skip to content

Commit cdf7f3b

Browse files
committed
fix: deterministic build
1 parent b9f6609 commit cdf7f3b

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
uses: actions/setup-dotnet@v4
2929

3030
# Create the NuGet package in the folder from the environment variable NuGetDirectory
31-
- run: dotnet pack --configuration Release --output ${{ env.NuGetDirectory }}
31+
- run: dotnet pack --configuration Release --output ${{ env.NuGetDirectory }} /p:Deterministic=true /p:PathMap='$(SolutionDir)=src/'
3232

3333
# Publish the NuGet package as an artifact, so they can be used in the following jobs
3434
- uses: actions/upload-artifact@v3

Directory.Build.Props

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<Project>
2+
<PropertyGroup>
3+
<PathMap>$(SolutionDir)=src/</PathMap>
4+
</PropertyGroup>
5+
</Project>

RuangDeveloper.AspNetCore.Command.csproj

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
<PackageIcon>icon.png</PackageIcon>
1717
<DebugType>embedded</DebugType>
1818
<Nullable>enable</Nullable>
19+
<Deterministic>true</Deterministic>
20+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
21+
<PathMap>$(SolutionDir)=/</PathMap>
1922
</PropertyGroup>
2023

2124
<ItemGroup>

0 commit comments

Comments
 (0)