From ccfac4d3b7b0076412b7aaaa3cb0cd6b63b1a8bc Mon Sep 17 00:00:00 2001 From: Patrik Svensson Date: Thu, 23 Nov 2023 21:28:12 +0100 Subject: [PATCH] Update to .NET 8.0 Also removes support for netcoreapp3.1 --- .github/workflows/ci.yaml | 24 ++++---------- .github/workflows/publish.yaml | 51 ++++------------------------- dotnet-tools.json | 8 +---- examples/CSharp/CSharp.csproj | 2 +- examples/FSharp/FSharp.fsproj | 2 +- global.json | 2 +- src/Example/Directory.Build.props | 12 +++---- src/Example/Directory.Build.targets | 2 +- src/Example/Example.csproj | 11 +++---- 9 files changed, 29 insertions(+), 85 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 3e0d59f..6d5f2f4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -9,30 +9,20 @@ jobs: build: name: Build if: "!contains(github.event.head_commit.message, 'skip-ci')" - strategy: - matrix: - kind: ['linux', 'windows', 'macOS'] - include: - - kind: linux - os: ubuntu-latest - - kind: windows - os: windows-latest - - kind: macOS - os: macos-latest - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Setup dotnet - uses: actions/setup-dotnet@v1 + - name: Setup .NET SDK + uses: actions/setup-dotnet@v3 with: dotnet-version: | - 7.0.100 - 6.0.400 - 3.1.425 + 8.0.x + 7.0.x + 6.0.x - name: Build shell: bash diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index a320124..d02bdbd 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -13,66 +13,27 @@ env: jobs: - ################################################### - # BUILD - ################################################### - - build: - name: Build - if: "!contains(github.event.head_commit.message, 'skip-ci')" - strategy: - matrix: - kind: ['linux', 'windows', 'macOS'] - include: - - kind: linux - os: ubuntu-latest - - kind: windows - os: windows-latest - - kind: macOS - os: macos-latest - runs-on: ${{ matrix.os }} - steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Setup dotnet - uses: actions/setup-dotnet@v1 - with: - dotnet-version: | - 7.0.100 - 6.0.400 - 3.1.425 - - - name: Build - shell: bash - run: | - dotnet tool restore - dotnet cake - ################################################### # PUBLISH ################################################### publish: name: Publish - needs: [build] if: "!contains(github.event.head_commit.message, 'skip-ci')" runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Setup dotnet - uses: actions/setup-dotnet@v1 + - name: Setup .NET SDK + uses: actions/setup-dotnet@v3 with: dotnet-version: | - 7.0.100 - 6.0.400 - 3.1.425 + 8.0.x + 7.0.x + 6.0.x - name: Publish shell: bash diff --git a/dotnet-tools.json b/dotnet-tools.json index 4a68e65..7b34695 100644 --- a/dotnet-tools.json +++ b/dotnet-tools.json @@ -3,16 +3,10 @@ "isRoot": true, "tools": { "cake.tool": { - "version": "3.0.0", + "version": "4.0.0", "commands": [ "dotnet-cake" ] - }, - "gpr": { - "version": "0.1.224", - "commands": [ - "gpr" - ] } } } \ No newline at end of file diff --git a/examples/CSharp/CSharp.csproj b/examples/CSharp/CSharp.csproj index 3c84343..7458a01 100644 --- a/examples/CSharp/CSharp.csproj +++ b/examples/CSharp/CSharp.csproj @@ -2,7 +2,7 @@ Exe - net7.0 + net8.0 CSharp Writes 'Hello from C#!' to the console. diff --git a/examples/FSharp/FSharp.fsproj b/examples/FSharp/FSharp.fsproj index 5f5e2ec..c6205ec 100644 --- a/examples/FSharp/FSharp.fsproj +++ b/examples/FSharp/FSharp.fsproj @@ -2,7 +2,7 @@ Exe - net7.0 + net8.0 FSharp Writes 'Hello from F#!' to the console. diff --git a/global.json b/global.json index edc4bc7..ac92294 100644 --- a/global.json +++ b/global.json @@ -1,7 +1,7 @@ { "projects": [ "src" ], "sdk": { - "version": "7.0.100", + "version": "8.0.100", "rollForward": "latestMinor" } } \ No newline at end of file diff --git a/src/Example/Directory.Build.props b/src/Example/Directory.Build.props index 4440d2c..970a403 100644 --- a/src/Example/Directory.Build.props +++ b/src/Example/Directory.Build.props @@ -1,7 +1,7 @@ true - 11 + 12 true embedded true @@ -16,14 +16,14 @@ true true - + - - - + + + All - + All diff --git a/src/Example/Directory.Build.targets b/src/Example/Directory.Build.targets index 4b6ff93..68be9d0 100644 --- a/src/Example/Directory.Build.targets +++ b/src/Example/Directory.Build.targets @@ -1,7 +1,7 @@ - preview + preview.0 normal diff --git a/src/Example/Example.csproj b/src/Example/Example.csproj index 3df5eb1..80968d7 100644 --- a/src/Example/Example.csproj +++ b/src/Example/Example.csproj @@ -4,7 +4,7 @@ Exe enable Example - net7.0;net6.0;netcoreapp3.1 + net8.0;net7.0;net6.0 true dotnet-example LatestMajor @@ -41,11 +41,10 @@ - - - - - + + + +