Skip to content

Commit

Permalink
Updated build scripts to support .NET 8
Browse files Browse the repository at this point in the history
  • Loading branch information
oskardudycz committed May 3, 2024
1 parent 498510e commit a90e918
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/build.dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,19 @@ jobs:
uses: actions/checkout@v3

- name: Install .NET 6
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: "6.0.x"

- name: Install .NET 7
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: "7.0.x"

- name: Restore NuGet packages
- name: Install .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.0.x"

- name: Build and Test
run: ./build.sh test
2 changes: 1 addition & 1 deletion .github/workflows/publish-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: actions/checkout@v3

- name: Install .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.dotnet_core_version }}

Expand Down
6 changes: 3 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
set -euo pipefail

version="$(dotnet --version)"
if [[ $version = 7.* ]]; then
target_framework="net7.0"
if [[ $version = 8.* ]]; then
target_framework="net8.0"
else
echo "BUILD FAILURE: .NET 7 SDK required to run build"
echo "BUILD FAILURE: .NET 8 SDK required to run build"
exit 1
fi

Expand Down
6 changes: 3 additions & 3 deletions src/Ogooreck.Build/Ogooreck.Build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Bullseye" Version="4.2.0" />
<PackageReference Include="SimpleExec" Version="11.0.0" />
<PackageReference Include="Bullseye" Version="5.0.0" />
<PackageReference Include="SimpleExec" Version="12.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit a90e918

Please sign in to comment.