Skip to content

Commit d8bb08c

Browse files
Try condition for os
1 parent c960a13 commit d8bb08c

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ concurrency:
1616

1717
jobs:
1818
ci:
19-
# Use windows to easily support .NET Framework 4.6.2 targets
20-
runs-on: ubuntu-latest
19+
strategy:
20+
matrix:
21+
os: [ubuntu-latest, windows-latest]
22+
runs-on: ${{ matrix.os }}
2123

2224
steps:
2325
- uses: actions/checkout@v4
@@ -26,9 +28,6 @@ jobs:
2628

2729
- uses: actions/setup-dotnet@v4
2830
with:
29-
dotnet-version: |
30-
6.0.428
31-
global-json-file: "./global.json"
3231
source-url: ${{ secrets.NUGET_GSOFTDEV_FEED_URL }}
3332
env:
3433
NUGET_AUTH_TOKEN: ${{ secrets.GSOFT_NUGET_API_KEY }}

Build.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Process {
2525
Exec { & dotnet test -c Release --no-build --results-directory "$outputDir" --no-restore -l "trx" -l "console;verbosity=detailed" }
2626
Exec { & dotnet pack -c Release --no-build -o "$outputDir" }
2727

28-
if (($null -ne $env:NUGET_SOURCE ) -and ($null -ne $env:NUGET_API_KEY)) {
28+
if (($null -ne $env:NUGET_SOURCE ) -and ($null -ne $env:NUGET_API_KEY) -and ($IsLinux)) {
2929
Exec { & dotnet nuget push "$nupkgsPath" -s $env:NUGET_SOURCE -k $env:NUGET_API_KEY --skip-duplicate }
3030
}
3131
}

src/Workleap.ComponentModel.DataAnnotations.Tests/Workleap.ComponentModel.DataAnnotations.Tests.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFrameworks>net462;net8.0</TargetFrameworks>
3+
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFrameworks Condition="$([MSBuild]::IsOsPlatform('Windows'))">$(TargetFramework);net462</TargetFrameworks>
45
<IsPackable>false</IsPackable>
56
<IsTestProject>true</IsTestProject>
67
<SignAssembly>true</SignAssembly>

0 commit comments

Comments
 (0)