Skip to content

Commit 340996f

Browse files
authored
.NET 8 support (#50)
* updated code to support .net 8 * ci/cd updates to support .net 8 and general updates * fixed dotnet install action
1 parent 5f1f347 commit 340996f

File tree

7 files changed

+104
-71
lines changed

7 files changed

+104
-71
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,20 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Checkout
20-
uses: actions/checkout@v3
20+
uses: actions/checkout@v4
2121
with:
2222
lfs: true
2323
fetch-depth: 0
2424
- name: 'Git Fetch Tags'
2525
run: git fetch --tags
2626
shell: pwsh
2727
- name: 'Install .NET Core SDK'
28-
uses: actions/setup-dotnet@v3
28+
uses: actions/setup-dotnet@v4
2929
with:
30-
dotnet-version: '7.0.x'
30+
dotnet-version: |
31+
6.0.x
32+
7.0.x
33+
8.0.x
3134
- name: 'Fix permissions'
3235
run: chmod +x ./Tests/VaultSharp.Extensions.Configuration.Test/approle.sh && chmod +x ./Tests/VaultSharp.Extensions.Configuration.Test/approle_nolist.sh
3336
shell: bash
@@ -44,12 +47,12 @@ jobs:
4447
if: github.event_name == 'pull_request'
4548
run: cp coverage/*/coverage.cobertura.xml coverage/coverage.cobertura.xml
4649
- name: 'Publish Code Coverage'
47-
uses: actions/upload-artifact@v2
50+
uses: actions/upload-artifact@v4
4851
with:
4952
name: Coverage Cobertura Report
5053
path: './coverage/coverage.cobertura.xml'
5154
- name: 'Publish Test Results'
52-
uses: actions/upload-artifact@v2
55+
uses: actions/upload-artifact@v4
5356
with:
5457
name: Tests HTML Report
5558
path: './coverage/VaultSharp.Extensions.Configuration.Test.html'

.github/workflows/master.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,17 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: Checkout
22-
uses: actions/checkout@v3
22+
uses: actions/checkout@v4
2323
with:
2424
lfs: true
2525
fetch-depth: 0
2626
- name: 'Install .NET Core SDK'
27-
uses: actions/setup-dotnet@v3
27+
uses: actions/setup-dotnet@v4
2828
with:
29-
dotnet-version: '7.0.x'
29+
dotnet-version: |
30+
6.0.x
31+
7.0.x
32+
8.0.x
3033
- name: 'Fix permissions'
3134
run: chmod +x ./Tests/VaultSharp.Extensions.Configuration.Test/approle.sh && chmod +x ./Tests/VaultSharp.Extensions.Configuration.Test/approle_nolist.sh
3235
shell: bash
@@ -49,12 +52,12 @@ jobs:
4952
echo "COVERAGE=$COVERAGE%" >> $GITHUB_ENV
5053
echo "BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_ENV
5154
- name: Create the Badgegg
52-
uses: schneegans/dynamic-badges-action@v1.6.0
55+
uses: schneegans/dynamic-badges-action@v1.7.0
5356
with:
5457
auth: ${{ secrets.GIST_SECRET }}
5558
gistID: 5242a4e2d58a428062b3a59824d5864e
5659
filename: VaultSharp.Extensions.Configuration__${{ env.BRANCH }}.json
5760
label: Coverage
5861
message: ${{ env.COVERAGE }}
5962
color: "#3fbe25"
60-
namedLogo: dotnet
63+
namedLogo: dotnet

.github/workflows/release.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,20 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout
14-
uses: actions/checkout@v3
14+
uses: actions/checkout@v4
1515
with:
1616
lfs: true
1717
fetch-depth: 0
1818
- name: 'Git Fetch Tags'
1919
run: git fetch --tags
2020
shell: pwsh
2121
- name: 'Install .NET Core SDK'
22-
uses: actions/setup-dotnet@v3
22+
uses: actions/setup-dotnet@v4
2323
with:
24-
dotnet-version: '7.0.x'
24+
dotnet-version: |
25+
6.0.x
26+
7.0.x
27+
8.0.x
2528
- name: 'Fix permissions'
2629
run: chmod +x ./Tests/VaultSharp.Extensions.Configuration.Test/approle.sh && chmod +x ./Tests/VaultSharp.Extensions.Configuration.Test/approle_nolist.sh
2730
shell: bash
@@ -41,12 +44,12 @@ jobs:
4144
run: dotnet cake --target=Publish --nuget-key="${{secrets.NUGET_API_KEY}}"
4245
shell: pwsh
4346
- name: 'Publish Code Coverage'
44-
uses: actions/upload-artifact@v2
47+
uses: actions/upload-artifact@v4
4548
with:
4649
name: tests
4750
path: './Artefacts/**/coverage.opencover.xml'
4851
- name: 'Publish Test Results'
49-
uses: actions/upload-artifact@v2
52+
uses: actions/upload-artifact@v4
5053
with:
5154
name: tests
52-
path: './Artefacts/VaultSharp.Extensions.Configuration.Test.html'
55+
path: './Artefacts/VaultSharp.Extensions.Configuration.Test.html'

Source/VaultSharp.Extensions.Configuration/VaultSharp.Extensions.Configuration.csproj

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@
77
<PackageId>VaultSharp.Extensions.Configuration</PackageId>
88
<PackageLicenseExpression>MIT</PackageLicenseExpression>
99
<Nullable>enable</Nullable>
10-
<TargetFrameworks>net6.0;net7.0;netstandard2.0;netstandard2.1</TargetFrameworks>
10+
<TargetFrameworks>net6.0;net7.0;net8.0;netstandard2.0;netstandard2.1</TargetFrameworks>
1111
<IncludeSymbols>true</IncludeSymbols>
1212
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
13-
<Copyright>Copyright 2023 © Mikhail Merkulov. All rights Reserved</Copyright>
13+
<Copyright>Copyright 2024 © Mikhail Merkulov. All rights Reserved</Copyright>
1414
</PropertyGroup>
1515

1616
<PropertyGroup Label="Package">
1717
<Product>VaultSharp.Extensions.Configuration</Product>
1818
<Description>
1919
Configuration extension that allows you to use Hashicorp Vault as a configuration backend.
20-
This library is built with .NET Standard 2.0, 2.1, .NET 6 &amp; .NET 7
20+
This library is built with .NET Standard 2.0, 2.1, .NET 6, .NET 7, .NET 8
2121
</Description>
2222
<PackageTags>Vault;Configuration;Data protection;Hashicorp</PackageTags>
2323
</PropertyGroup>
@@ -80,7 +80,7 @@
8080
</ItemGroup>
8181

8282
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
83-
<PackageReference Include="System.Text.Json" Version="7.0.3" />
83+
<PackageReference Include="System.Text.Json" Version="7.0.4" />
8484
<PackageReference Include="Microsoft.Extensions.Configuration" Version="7.0.0" />
8585
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="7.0.0" />
8686
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
@@ -90,6 +90,17 @@
9090
</PackageReference>
9191
</ItemGroup>
9292

93+
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
94+
<PackageReference Include="System.Text.Json" Version="8.0.1" />
95+
<PackageReference Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
96+
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" />
97+
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
98+
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="8.0.0">
99+
<PrivateAssets>all</PrivateAssets>
100+
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
101+
</PackageReference>
102+
</ItemGroup>
103+
93104
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
94105
<AssemblyTitle>VaultSharp configuration extensions .NET Standard 2.0</AssemblyTitle>
95106
</PropertyGroup>
@@ -106,6 +117,10 @@
106117
<AssemblyTitle>VaultSharp configuration extensions .NET 7</AssemblyTitle>
107118
</PropertyGroup>
108119

120+
<PropertyGroup Condition="'$(TargetFramework)'=='net8.0'">
121+
<AssemblyTitle>VaultSharp configuration extensions .NET 8</AssemblyTitle>
122+
</PropertyGroup>
123+
109124
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net6.0|AnyCPU'">
110125
<WarningLevel>5</WarningLevel>
111126
</PropertyGroup>

0 commit comments

Comments
 (0)