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 4499a91
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
9 changes: 7 additions & 2 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: Install .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.0.x"

- name: Restore NuGet packages
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

0 comments on commit 4499a91

Please sign in to comment.