Skip to content

Code Quality: Add conditional package reference to console project #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 2, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -26,10 +26,10 @@ jobs:
dotnet-version: '9.0.x'

- name: Restore dependencies
run: dotnet restore
run: dotnet restore /p:GITHUB_ACTIONS=true

- name: Build
run: dotnet build --configuration ${{ matrix.configuration }} --no-restore
run: dotnet build --configuration ${{ matrix.configuration }} --no-restore /p:GITHUB_ACTIONS=true

test:
name: Test
@@ -52,4 +52,4 @@ jobs:
dotnet-version: '9.0.x'

- name: Test
run: dotnet test --configuration Release --verbosity normal
run: dotnet test --configuration Release --verbosity normal /p:GITHUB_ACTIONS=true
7 changes: 6 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -18,4 +18,9 @@
<DisplayVersion Condition="'$(ReleaseLevel)' != 'final'">$(DisplayVersion)-$(ReleaseLevel)$(BetaVersion)</DisplayVersion>
<Version>$(DisplayVersion)</Version>
</PropertyGroup>
</Project>

<!-- Deterministic build -->
<PropertyGroup Condition="'$(TF_BUILD)' == 'true' or '$(GITHUB_ACTIONS)' == 'true'">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -15,4 +15,13 @@
<PackageReference Include="Riverside.JsonBinder" Version="$(DisplayVersion)" />
</ItemGroup>

<ItemGroup Condition="'$(ContinuousIntegrationBuild)' == 'true'">
<ProjectReference Include="..\Riverside.JsonBinder\Riverside.JsonBinder.csproj" />
</ItemGroup>

<ItemGroup Condition="'$(ContinuousIntegrationBuild)' != 'true'">
<ProjectReference Condition="'$(Configuration)' == 'Debug'" Include="..\Riverside.JsonBinder\Riverside.JsonBinder.csproj" />
<PackageReference Condition="'$(Configuration)' == 'Release'" Include="Riverside.JsonBinder" Version="$(DisplayVersion)" />
</ItemGroup>

</Project>
Loading