diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index ba54d7eb..5ebd0e85 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -7,16 +7,15 @@ on:
jobs:
build:
name: Build
- runs-on: windows-2019
+ runs-on: windows-latest
steps:
- uses: actions/checkout@master
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
- 2.1.x
- 3.1.x
6.0.x
+ 8.0.x
- name: Clean package cache as a temporary workaround for https://github.com/actions/setup-dotnet/issues/155
working-directory: ./source
run: dotnet clean -c Release && dotnet nuget locals all --clear
@@ -30,16 +29,15 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
- os: [ macos-latest, ubuntu-latest, windows-2019 ]
+ os: [ macos-latest, ubuntu-latest, windows-latest ]
steps:
- uses: actions/checkout@master
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
- 2.1.x
- 3.1.x
- 6.0.x
+ 6.0.x
+ 8.0.x
- name: Clean package cache as a temporary workaround for https://github.com/actions/setup-dotnet/issues/155
working-directory: ./source
run: dotnet clean -c Release && dotnet nuget locals all --clear
@@ -49,7 +47,7 @@ jobs:
sonar-ci:
name: SonarCloud
- runs-on: windows-2019
+ runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
@@ -58,9 +56,8 @@ jobs:
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
- 2.1.x
- 3.1.x
- 6.0.x
+ 6.0.x
+ 8.0.x
- uses: actions/setup-java@v4
with:
java-version: '21' # The JDK version to make available on the path.
@@ -69,14 +66,14 @@ jobs:
working-directory: ./source
run: dotnet clean -c Release && dotnet nuget locals all --clear
- name: Cache SonarCloud packages
- uses: actions/cache@v1
+ uses: actions/cache@v4
with:
path: ~\sonar\cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache SonarCloud scanner
id: cache-sonar-scanner
- uses: actions/cache@v1
+ uses: actions/cache@v4
with:
path: .\.sonar\scanner
key: ${{ runner.os }}-sonar-scanner
@@ -107,9 +104,8 @@ jobs:
- uses: actions/setup-dotnet@v1
with:
dotnet-version: |
- 2.1.x
- 3.1.x
- 6.0.x
+ 6.0.x
+ 8.0.x
- name: Clean package cache as a temporary workaround for https://github.com/actions/setup-dotnet/issues/155
working-directory: ./source
run: dotnet clean -c Release && dotnet nuget locals all --clear
@@ -137,7 +133,7 @@ jobs:
fail-on-alert: false
alert-comment-cc-users: '@zjklee'
- name: Upload Artifacts
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v4
with:
name: Benchmark
path: source/Handlebars.Benchmark/BenchmarkDotNet.Artifacts/results/
diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml
index 25301f4b..8aadbb12 100644
--- a/.github/workflows/pull_request.yml
+++ b/.github/workflows/pull_request.yml
@@ -7,16 +7,15 @@ on:
jobs:
build:
name: Build
- runs-on: windows-2019
+ runs-on: windows-latest
steps:
- uses: actions/checkout@master
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
- 2.1.x
- 3.1.x
- 6.0.x
+ 6.0.x
+ 8.0.x
- name: Clean package cache as a temporary workaround for https://github.com/actions/setup-dotnet/issues/155
working-directory: ./source
run: dotnet clean -c Release && dotnet nuget locals all --clear
@@ -30,16 +29,15 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
- os: [ macos-latest, ubuntu-latest, windows-2019 ]
+ os: [ macos-latest, ubuntu-latest, windows-latest ]
steps:
- uses: actions/checkout@master
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
- 2.1.x
- 3.1.x
- 6.0.x
+ 6.0.x
+ 8.0.x
- name: Clean package cache as a temporary workaround for https://github.com/actions/setup-dotnet/issues/155
working-directory: ./source
run: dotnet clean -c Release && dotnet nuget locals all --clear
@@ -49,7 +47,7 @@ jobs:
sonar-pr:
name: SonarCloud
- runs-on: windows-2019
+ runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
@@ -58,9 +56,8 @@ jobs:
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
- 2.1.x
- 3.1.x
- 6.0.x
+ 6.0.x
+ 8.0.x
- uses: actions/setup-java@v4
with:
java-version: '21' # The JDK version to make available on the path.
@@ -69,14 +66,14 @@ jobs:
working-directory: ./source
run: dotnet clean -c Release && dotnet nuget locals all --clear
- name: Cache SonarCloud packages
- uses: actions/cache@v1
+ uses: actions/cache@v4
with:
path: ~\sonar\cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache SonarCloud scanner
id: cache-sonar-scanner
- uses: actions/cache@v1
+ uses: actions/cache@v4
with:
path: .\.sonar\scanner
key: ${{ runner.os }}-sonar-scanner
@@ -107,9 +104,8 @@ jobs:
- uses: actions/setup-dotnet@v1
with:
dotnet-version: |
- 2.1.x
- 3.1.x
- 6.0.x
+ 6.0.x
+ 8.0.x
- name: Clean package cache as a temporary workaround for https://github.com/actions/setup-dotnet/issues/155
working-directory: ./source
run: dotnet clean -c Release && dotnet nuget locals all --clear
@@ -138,7 +134,7 @@ jobs:
alert-comment-cc-users: '@zjklee'
- name: Upload Artifacts
- uses: actions/upload-artifact@v2
+ uses: actions/upload-artifact@v4
with:
name: Benchmark
path: source/Handlebars.Benchmark/BenchmarkDotNet.Artifacts/results/
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 338ea23b..032384de 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -7,7 +7,7 @@ on:
jobs:
publish:
name: Publish
- runs-on: windows-2019
+ runs-on: windows-latest
steps:
- uses: actions/checkout@v2
@@ -22,9 +22,8 @@ jobs:
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
- 2.1.x
- 3.1.x
- 6.0.x
+ 6.0.x
+ 8.0.x
- name: Clean package cache as a temporary workaround for https://github.com/actions/setup-dotnet/issues/155
working-directory: ./source
diff --git a/source/Handlebars.Benchmark/Handlebars.Benchmark.csproj b/source/Handlebars.Benchmark/Handlebars.Benchmark.csproj
index 1174d8a2..44480846 100644
--- a/source/Handlebars.Benchmark/Handlebars.Benchmark.csproj
+++ b/source/Handlebars.Benchmark/Handlebars.Benchmark.csproj
@@ -2,15 +2,15 @@
Exe
- netcoreapp3.1
+ net8.0
false
false
HandlebarsNet.Benchmark
-
-
+
+
diff --git a/source/Handlebars.Benchmark/Program.cs b/source/Handlebars.Benchmark/Program.cs
index 87715600..23c07f22 100644
--- a/source/Handlebars.Benchmark/Program.cs
+++ b/source/Handlebars.Benchmark/Program.cs
@@ -10,7 +10,7 @@ static class Program
public static void Main(string[] args)
{
var job = Job.MediumRun
- .WithToolchain(CsProjCoreToolchain.NetCoreApp31)
+ .WithToolchain(CsProjCoreToolchain.NetCoreApp80)
.WithLaunchCount(1);
var manualConfig = DefaultConfig.Instance
diff --git a/source/Handlebars.Test/Handlebars.Test.csproj b/source/Handlebars.Test/Handlebars.Test.csproj
index 7205360e..83aafd18 100644
--- a/source/Handlebars.Test/Handlebars.Test.csproj
+++ b/source/Handlebars.Test/Handlebars.Test.csproj
@@ -1,8 +1,8 @@
- netcoreapp3.1;net6
- $(TargetFrameworks);net452;net46;net461;net472
+ net6;net8
+ $(TargetFrameworks);net452;net462;net472;net481
6BA232A6-8C4D-4C7D-BD75-1844FE9774AF
HandlebarsDotNet.Test
false
@@ -22,7 +22,7 @@
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
@@ -30,7 +30,7 @@
-
+
@@ -38,7 +38,7 @@
-
+
diff --git a/source/Handlebars/Handlebars.csproj b/source/Handlebars/Handlebars.csproj
index df5c44d4..f9bb4876 100644
--- a/source/Handlebars/Handlebars.csproj
+++ b/source/Handlebars/Handlebars.csproj
@@ -3,7 +3,7 @@
Handlebars
9822C7B8-7E51-42BC-9A49-72A10491B202
- netstandard1.3;netstandard2.0;netstandard2.1;net6
+ netstandard2.0;netstandard2.1;net6;net8
$(TargetFrameworks);net451
2.0.0
HandlebarsDotNet
@@ -36,27 +36,16 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
diff --git a/source/Handlebars/IO/EncodedTextWriter.cs b/source/Handlebars/IO/EncodedTextWriter.cs
index 8bb0f102..7a6cbb46 100644
--- a/source/Handlebars/IO/EncodedTextWriter.cs
+++ b/source/Handlebars/IO/EncodedTextWriter.cs
@@ -138,11 +138,7 @@ public void Write(T value)
private void WriteFormatted(T value)
{
var type = typeof(T);
-#if NETSTANDARD1_3
- if (type.GetTypeInfo().IsClass) type = value.GetType();
-#else
if (type.IsClass) type = value.GetType();
-#endif
if (!_formatterProvider.TryCreateFormatter(type, out var formatter))
Throw.CannotResolveFormatter(type);