Skip to content

Commit 5e69c95

Browse files
committed
Fix Tests and Add Deterministic Builds
1 parent a4c7fb0 commit 5e69c95

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,19 @@ jobs:
2222
run: dotnet build --configuration Release --no-restore /p:FodyGenerateXsd=false /p:TreatWarningsAsErrors=true
2323
- name: Run Tests
2424
run: dotnet test --configuration Release --no-build
25+
26+
nupkg:
27+
name: Generate NuGet Packages
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v2
31+
- uses: actions/setup-dotnet@v1
32+
name: Install Current .NET SDK
33+
- name: Generate NuGet Packages
34+
run: dotnet pack --configuration Release --output nupkg
35+
- uses: actions/upload-artifact@v2
36+
if: success() && github.ref == 'refs/heads/main'
37+
with:
38+
name: nupkg
39+
path: nupkg/*
40+
retention-days: 1

Directory.Build.props

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,12 @@
1616
<ItemGroup>
1717
<PackageReference Include="Messerli.CodeStyle" PrivateAssets="all" />
1818
</ItemGroup>
19+
<PropertyGroup Label="Deterministic Builds and Source Link">
20+
<PublishRepositoryUrl>true</PublishRepositoryUrl>
21+
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>
22+
<EmbedUntrackedSources>true</EmbedUntrackedSources>
23+
</PropertyGroup>
24+
<ItemGroup Label="Deterministic Builds and Source Link">
25+
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="all" VersionOverride="1.1.1" />
26+
</ItemGroup>
1927
</Project>

0 commit comments

Comments
 (0)