Skip to content

Commit 7c739f1

Browse files
committed
Build on Ubuntu and Windows
Run only .NET Core targets on Ubuntu
1 parent 87f74a8 commit 7c739f1

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ env:
1919
jobs:
2020
build:
2121
strategy:
22+
fail-fast: false
2223
matrix:
24+
os: [ ubuntu-24.04, windows-2022 ]
2325
configuration: [ 'Debug', 'Release' ]
2426

25-
runs-on: ubuntu-22.04
27+
runs-on: ${{ matrix.os }}
2628

2729
env:
2830
Configuration: ${{ matrix.configuration }}
@@ -49,12 +51,14 @@ jobs:
4951

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

5357
- name: pack
5458
run: dotnet pack --no-build --no-restore -c ${{ matrix.configuration }} -o dist
5559

5660
- name: publish artifact
5761
uses: actions/upload-artifact@v4
5862
with:
59-
name: VbaCompression_${{ env.VersionSuffix }}_${{ matrix.configuration }}
63+
name: VbaCompression_${{ env.VersionSuffix }}_${{ matrix.configuration }}_${{ matrix.os }}
6064
path: '${{ github.workspace }}/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)