Skip to content

Commit

Permalink
Update to .NET 8.0
Browse files Browse the repository at this point in the history
Also removes support for netcoreapp3.1
  • Loading branch information
patriksvensson committed Nov 23, 2023
1 parent 06f9b38 commit ccfac4d
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 85 deletions.
24 changes: 7 additions & 17 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
51 changes: 6 additions & 45 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 1 addition & 7 deletions dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}
}
}
2 changes: 1 addition & 1 deletion examples/CSharp/CSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ExampleTitle>CSharp</ExampleTitle>
<ExampleDescription>Writes 'Hello from C#!' to the console.</ExampleDescription>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion examples/FSharp/FSharp.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ExampleTitle>FSharp</ExampleTitle>
<ExampleDescription>Writes 'Hello from F#!' to the console.</ExampleDescription>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"projects": [ "src" ],
"sdk": {
"version": "7.0.100",
"version": "8.0.100",
"rollForward": "latestMinor"
}
}
12 changes: 6 additions & 6 deletions src/Example/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup Label="Settings">
<Deterministic>true</Deterministic>
<LangVersion>11</LangVersion>
<LangVersion>12</LangVersion>
<DebugSymbols>true</DebugSymbols>
<DebugType>embedded</DebugType>
<MinVerSkip Condition="'$(Configuration)' == 'Debug'">true</MinVerSkip>
Expand All @@ -16,14 +16,14 @@
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
</PropertyGroup>

<ItemGroup Label="Package References">
<PackageReference Include="MinVer" PrivateAssets="All" Version="4.2.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" PrivateAssets="All" Version="1.1.1" />
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.376">
<PackageReference Include="MinVer" PrivateAssets="All" Version="4.3.0" />
<PackageReference Update="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.507">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Roslynator.Analyzers" Version="4.2.0">
<PackageReference Include="Roslynator.Analyzers" Version="4.6.2">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Example/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<Target Name="Versioning" BeforeTargets="MinVer">
<PropertyGroup Label="Build">
<MinVerDefaultPreReleasePhase>preview</MinVerDefaultPreReleasePhase>
<MinVerDefaultPreReleaseIdentifiers>preview.0</MinVerDefaultPreReleaseIdentifiers>
<MinVerVerbosity>normal</MinVerVerbosity>
</PropertyGroup>
</Target>
Expand Down
11 changes: 5 additions & 6 deletions src/Example/Example.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<OutputType>Exe</OutputType>
<Nullable>enable</Nullable>
<AssemblyName>Example</AssemblyName>
<TargetFrameworks>net7.0;net6.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>net8.0;net7.0;net6.0</TargetFrameworks>
<PackAsTool>true</PackAsTool>
<PackageId>dotnet-example</PackageId>
<RollForward>LatestMajor</RollForward>
Expand Down Expand Up @@ -41,11 +41,10 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="CliWrap" Version="3.5.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.4.0" />
<PackageReference Include="Spectre.Console" Version="0.45.1-preview.0.45" />
<PackageReference Include="Spectre.Console.Cli" Version="0.45.1-preview.0.45" />
<PackageReference Include="Spectre.IO" Version="0.9.0" />
<PackageReference Include="CliWrap" Version="3.6.4" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" />
<PackageReference Include="Spectre.Console.Cli" Version="0.48.0" />
<PackageReference Include="Spectre.IO" Version="0.14.0" />
</ItemGroup>

</Project>

0 comments on commit ccfac4d

Please sign in to comment.