diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9fff8c1..2a7133b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,10 +3,10 @@ name: CI on: push: branches: - - master + - main pull_request: branches: - - master + - main jobs: build: runs-on: ubuntu-latest @@ -15,10 +15,13 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: Setup dotnet 6.0 - uses: actions/setup-dotnet@v1 + - name: Setup dotnet + uses: actions/setup-dotnet@v4 with: - dotnet-version: '6.0' + dotnet-version: | + 8.0.x + 9.0.x + 10.0.x - name: Build and Test run: ./Build.ps1 shell: pwsh @@ -29,7 +32,7 @@ jobs: run: ./Push.ps1 shell: pwsh - name: Artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: artifacts path: artifacts/**/* \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b96ca0f..1cf9bcb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,10 +14,13 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 - - name: Setup dotnet 6.0 - uses: actions/setup-dotnet@v1 + - name: Setup dotnet + uses: actions/setup-dotnet@v4 with: - dotnet-version: '6.0' + dotnet-version: | + 8.0.x + 9.0.x + 10.0.x - name: Build and Test run: ./Build.ps1 shell: pwsh @@ -34,7 +37,7 @@ jobs: run: ./Push.ps1 shell: pwsh - name: Artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: artifacts path: artifacts/**/* \ No newline at end of file diff --git a/.gitignore b/.gitignore index f3b597e..1045c4d 100644 --- a/.gitignore +++ b/.gitignore @@ -37,3 +37,4 @@ node_modules *.ng.ts *.sln.ide project.lock.json +.idea/* \ No newline at end of file diff --git a/Push.ps1 b/Push.ps1 index 9663563..989042d 100644 --- a/Push.ps1 +++ b/Push.ps1 @@ -6,7 +6,7 @@ if ([string]::IsNullOrEmpty($Env:NUGET_API_KEY)) { } else { Get-ChildItem $artifacts -Filter "*.nupkg" | ForEach-Object { Write-Host "$($scriptName): Pushing $($_.Name)" - dotnet nuget push $_ --source $Env:NUGET_URL --api-key $Env:NUGET_API_KEY + dotnet nuget push $_ --source $Env:NUGET_URL --api-key $Env:NUGET_API_KEY --skip-duplicate if ($lastexitcode -ne 0) { throw ("Exec: " + $errorMessage) } diff --git a/readme.md b/readme.md index bdefd81..9677ea5 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,4 @@ -# ![HtmlTags](https://raw.githubusercontent.com/HtmlTags/htmltags/master/logo/FubuHtml_32.png) HtmlTags +# ![HtmlTags](https://raw.githubusercontent.com/HtmlTags/htmltags/main/logo/FubuHtml_32.png) HtmlTags [![CI](https://github.com/htmltags/htmltags/workflows/CI/badge.svg)](https://github.com/htmltags/htmltags/workflows/CI) [![NuGet](https://img.shields.io/nuget/dt/htmltags.svg)](https://www.nuget.org/packages/htmltags) diff --git a/src/HtmlTags.AspNetCore.TestSite/HtmlTags.AspNetCore.TestSite.csproj b/src/HtmlTags.AspNetCore.TestSite/HtmlTags.AspNetCore.TestSite.csproj index b6c5861..de99bf7 100644 --- a/src/HtmlTags.AspNetCore.TestSite/HtmlTags.AspNetCore.TestSite.csproj +++ b/src/HtmlTags.AspNetCore.TestSite/HtmlTags.AspNetCore.TestSite.csproj @@ -1,7 +1,7 @@  - net6.0 + net10.0 diff --git a/src/HtmlTags/HtmlTags.csproj b/src/HtmlTags/HtmlTags.csproj index ace2bc7..edc6d94 100644 --- a/src/HtmlTags/HtmlTags.csproj +++ b/src/HtmlTags/HtmlTags.csproj @@ -1,8 +1,8 @@  - net6.0 - Easy generation of html with a jquery inspired object model + net8.0;net9.0;net10.0 + Easy generation of HTML with a fluent API Copyright Jeremy D. Miller, Josh Arnold, Joshua Flanagan, Jimmy Bogard, et al. All rights reserved. Jeremy D. Miller;Joshua Flanagan;Josh Arnold;Jimmy Bogard HtmlTags @@ -27,7 +27,6 @@ - diff --git a/src/HtmlTags/Reflection/PropertyChain.cs b/src/HtmlTags/Reflection/PropertyChain.cs index ec82b94..bfbcc46 100644 --- a/src/HtmlTags/Reflection/PropertyChain.cs +++ b/src/HtmlTags/Reflection/PropertyChain.cs @@ -52,8 +52,8 @@ public Type OwnerType var last = _valueGetters.Last(); if (last is MethodValueGetter || last is IndexerValueGetter) { - var nextUp = _chain.Reverse().Skip(1).FirstOrDefault() as PropertyValueGetter; - if (nextUp != null) + // https://github.com/dotnet/roslyn/issues/77212 + if (Enumerable.Reverse(_chain).Skip(1).FirstOrDefault() is PropertyValueGetter nextUp) { return nextUp.PropertyInfo.PropertyType; } diff --git a/test/HtmlTags.Testing/HtmlTags.Testing.csproj b/test/HtmlTags.Testing/HtmlTags.Testing.csproj index 3e49f6a..f04af20 100644 --- a/test/HtmlTags.Testing/HtmlTags.Testing.csproj +++ b/test/HtmlTags.Testing/HtmlTags.Testing.csproj @@ -1,7 +1,7 @@  - net6.0 + net10.0 true false