Skip to content

Commit

Permalink
.NET 8 support (#50)
Browse files Browse the repository at this point in the history
* updated code to support .net 8

* ci/cd updates to support .net 8 and general updates

* fixed dotnet install action
  • Loading branch information
MrZoidberg authored Jan 30, 2024
1 parent 5f1f347 commit 340996f
Show file tree
Hide file tree
Showing 7 changed files with 104 additions and 71 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
lfs: true
fetch-depth: 0
- name: 'Git Fetch Tags'
run: git fetch --tags
shell: pwsh
- name: 'Install .NET Core SDK'
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: '7.0.x'
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: 'Fix permissions'
run: chmod +x ./Tests/VaultSharp.Extensions.Configuration.Test/approle.sh && chmod +x ./Tests/VaultSharp.Extensions.Configuration.Test/approle_nolist.sh
shell: bash
Expand All @@ -44,12 +47,12 @@ jobs:
if: github.event_name == 'pull_request'
run: cp coverage/*/coverage.cobertura.xml coverage/coverage.cobertura.xml
- name: 'Publish Code Coverage'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Coverage Cobertura Report
path: './coverage/coverage.cobertura.xml'
- name: 'Publish Test Results'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: Tests HTML Report
path: './coverage/VaultSharp.Extensions.Configuration.Test.html'
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
lfs: true
fetch-depth: 0
- name: 'Install .NET Core SDK'
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: '7.0.x'
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: 'Fix permissions'
run: chmod +x ./Tests/VaultSharp.Extensions.Configuration.Test/approle.sh && chmod +x ./Tests/VaultSharp.Extensions.Configuration.Test/approle_nolist.sh
shell: bash
Expand All @@ -49,12 +52,12 @@ jobs:
echo "COVERAGE=$COVERAGE%" >> $GITHUB_ENV
echo "BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_ENV
- name: Create the Badgegg
uses: schneegans/dynamic-badges-action@v1.6.0
uses: schneegans/dynamic-badges-action@v1.7.0
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: 5242a4e2d58a428062b3a59824d5864e
filename: VaultSharp.Extensions.Configuration__${{ env.BRANCH }}.json
label: Coverage
message: ${{ env.COVERAGE }}
color: "#3fbe25"
namedLogo: dotnet
namedLogo: dotnet
15 changes: 9 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
lfs: true
fetch-depth: 0
- name: 'Git Fetch Tags'
run: git fetch --tags
shell: pwsh
- name: 'Install .NET Core SDK'
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: '7.0.x'
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: 'Fix permissions'
run: chmod +x ./Tests/VaultSharp.Extensions.Configuration.Test/approle.sh && chmod +x ./Tests/VaultSharp.Extensions.Configuration.Test/approle_nolist.sh
shell: bash
Expand All @@ -41,12 +44,12 @@ jobs:
run: dotnet cake --target=Publish --nuget-key="${{secrets.NUGET_API_KEY}}"
shell: pwsh
- name: 'Publish Code Coverage'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: tests
path: './Artefacts/**/coverage.opencover.xml'
- name: 'Publish Test Results'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: tests
path: './Artefacts/VaultSharp.Extensions.Configuration.Test.html'
path: './Artefacts/VaultSharp.Extensions.Configuration.Test.html'
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
<PackageId>VaultSharp.Extensions.Configuration</PackageId>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<Nullable>enable</Nullable>
<TargetFrameworks>net6.0;net7.0;netstandard2.0;netstandard2.1</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0;netstandard2.0;netstandard2.1</TargetFrameworks>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<Copyright>Copyright 2023 © Mikhail Merkulov. All rights Reserved</Copyright>
<Copyright>Copyright 2024 © Mikhail Merkulov. All rights Reserved</Copyright>
</PropertyGroup>

<PropertyGroup Label="Package">
<Product>VaultSharp.Extensions.Configuration</Product>
<Description>
Configuration extension that allows you to use Hashicorp Vault as a configuration backend.
This library is built with .NET Standard 2.0, 2.1, .NET 6 &amp; .NET 7
This library is built with .NET Standard 2.0, 2.1, .NET 6, .NET 7, .NET 8
</Description>
<PackageTags>Vault;Configuration;Data protection;Hashicorp</PackageTags>
</PropertyGroup>
Expand Down Expand Up @@ -80,7 +80,7 @@
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
<PackageReference Include="System.Text.Json" Version="7.0.3" />
<PackageReference Include="System.Text.Json" Version="7.0.4" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
Expand All @@ -90,6 +90,17 @@
</PackageReference>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="System.Text.Json" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<AssemblyTitle>VaultSharp configuration extensions .NET Standard 2.0</AssemblyTitle>
</PropertyGroup>
Expand All @@ -106,6 +117,10 @@
<AssemblyTitle>VaultSharp configuration extensions .NET 7</AssemblyTitle>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)'=='net8.0'">
<AssemblyTitle>VaultSharp configuration extensions .NET 8</AssemblyTitle>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net6.0|AnyCPU'">
<WarningLevel>5</WarningLevel>
</PropertyGroup>
Expand Down
Loading

0 comments on commit 340996f

Please sign in to comment.