Skip to content

Commit 470e729

Browse files
committed
Run only .NET Core targets on Ubuntu
1 parent 08456bf commit 470e729

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
strategy:
2222
fail-fast: false
2323
matrix:
24-
os: [ ubuntu-22.04, windows-2022 ]
24+
os: [ ubuntu-24.04, windows-2022 ]
2525
configuration: [ 'Debug', 'Release' ]
2626

2727
runs-on: ${{ matrix.os }}
@@ -51,6 +51,8 @@ jobs:
5151

5252
- name: test
5353
run: dotnet test --no-build --no-restore
54+
env:
55+
TestNetCoreOnly: ${{ contains(matrix.os, 'ubuntu') }}
5456

5557
- name: pack
5658
run: dotnet pack --no-build --no-restore -c ${{ matrix.configuration }} -o dist

src/Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<PropertyGroup>
44
<VersionPrefix>1.0.0</VersionPrefix>
55
<TargetFrameworks>net462;net48;net6.0;net7.0;net8.0</TargetFrameworks>
6+
<TargetFrameworks Condition=" '$(TestNetCoreOnly)' == 'true' ">net6.0;net7.0;net8.0</TargetFrameworks>
67
</PropertyGroup>
78

89
<PropertyGroup>

0 commit comments

Comments
 (0)