Skip to content

Commit 989ed46

Browse files
authored
Major: support for .NET 9 (#26)
* Updated target to net9.0 * Merged net8.0 and net9.0 targets * Updated workflows
1 parent ee0ae96 commit 989ed46

File tree

8 files changed

+28
-22
lines changed

8 files changed

+28
-22
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{
44
"name": "SimpleOTP",
55
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6-
"image": "mcr.microsoft.com/devcontainers/dotnet:1-8.0",
6+
"image": "mcr.microsoft.com/devcontainers/dotnet:1-9.0",
77

88
// Features to add to the dev container. More info: https://containers.dev/features.
99
// "features": {},

.github/workflows/codeql-analysis.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ name: "CodeQL"
88

99
on:
1010
push:
11-
branches: [ "main" ]
11+
branches: [ "main", "next" ]
1212
paths-ignore:
1313
- '**.md'
1414
- 'LICENSE'
@@ -19,7 +19,7 @@ on:
1919
- '.assets/*'
2020
pull_request:
2121
# The branches below must be a subset of the branches above
22-
branches: [ "main" ]
22+
branches: [ "main", "next" ]
2323
paths-ignore:
2424
- '**.md'
2525
- 'LICENSE'
@@ -66,8 +66,16 @@ jobs:
6666

6767
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
6868
# If this step fails, then you should remove it and run the build manually (see below)
69-
- name: Autobuild
70-
uses: github/codeql-action/autobuild@v3
69+
# - name: Autobuild
70+
# uses: github/codeql-action/autobuild@v3
71+
72+
- name: Setup .NET
73+
uses: actions/setup-dotnet@v4
74+
with:
75+
dotnet-version: 9.0.x
76+
77+
- name: Build project
78+
run: dotnet build
7179

7280
# ℹ️ Command-line programs to run using the OS shell.
7381
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

.github/workflows/pr-workflow.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: "Build workflow"
22

33
on:
44
push:
5-
branches: [ "main" ]
5+
branches: [ "main", "next" ]
66
paths-ignore:
77
- "**.md"
88
- "LICENSE"
@@ -12,7 +12,7 @@ on:
1212
- ".devcontainer/*"
1313
- "!.github/workflows/pr-workflow.yml"
1414
pull_request:
15-
branches: [ "main" ]
15+
branches: [ "main", "next" ]
1616
paths-ignore:
1717
- "**.md"
1818
- "LICENSE"
@@ -33,7 +33,7 @@ jobs:
3333
- name: Setup .NET
3434
uses: actions/setup-dotnet@v4
3535
with:
36-
dotnet-version: 8.0.x
36+
dotnet-version: 9.0.x
3737

3838
- run: dotnet restore
3939
- run: dotnet build --no-restore
@@ -46,7 +46,7 @@ jobs:
4646
with:
4747
name: SimpleOTP
4848
path: libraries/SimpleOTP/bin/Debug/EugeneFox.SimpleOTP*.*nupkg
49-
49+
5050
- name: Drop SimpleOTP.DependencyInjection
5151
uses: actions/upload-artifact@main
5252
with:

.github/workflows/release-workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Setup .NET
1616
uses: actions/setup-dotnet@v4
1717
with:
18-
dotnet-version: 8.0.x
18+
dotnet-version: 9.0.x
1919

2020
- run: dotnet restore
2121
- run: dotnet pack

SimpleOTP.Tests/SimpleOTP.Tests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77

@@ -10,7 +10,7 @@
1010
</PropertyGroup>
1111

1212
<ItemGroup>
13-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
13+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
1414
<PackageReference Include="NUnit" Version="4.2.2" />
1515
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
1616
</ItemGroup>

libraries/SimpleOTP.DependencyInjection/SimpleOTP.DependencyInjection.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<GenerateDocumentationFile>true</GenerateDocumentationFile>
88
</PropertyGroup>
99

1010
<PropertyGroup>
1111
<PackageId>EugeneFox.SimpleOTP.DependencyInjection</PackageId>
12-
<Version>8.0.0.0</Version>
12+
<Version>9.0.0.0</Version>
1313
<Authors>Eugene Fox</Authors>
1414
<Copyright>Copyright © Eugene Fox 2024</Copyright>
1515
<NeutralLanguage>en-US</NeutralLanguage>
@@ -37,7 +37,7 @@
3737
service in your application.
3838
</Description>
3939
<PackageReleaseNotes>
40-
Initial release. See README.md for details.
40+
New major version for .NET 9
4141
</PackageReleaseNotes>
4242
</PropertyGroup>
4343

@@ -57,9 +57,9 @@
5757
</ItemGroup>
5858

5959
<ItemGroup>
60-
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.*" />
60+
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="9.0.*" />
6161
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions"
62-
Version="8.0.*" />
62+
Version="9.0.*" />
6363
</ItemGroup>
6464

6565
</Project>

libraries/SimpleOTP/Otp.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
namespace SimpleOTP;
44

5-
// TODO: Add tests
6-
75
/// <summary>
86
/// Represents an abstract class for generating and validating One-Time Passwords (OTP).
97
/// </summary>

libraries/SimpleOTP/SimpleOTP.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77
<GenerateDocumentationFile>true</GenerateDocumentationFile>
@@ -14,7 +14,7 @@
1414

1515
<PropertyGroup>
1616
<PackageId>EugeneFox.SimpleOTP</PackageId>
17-
<Version>8.0.0.0</Version>
17+
<Version>9.0.0.0</Version>
1818
<Authors>Eugene Fox</Authors>
1919
<Copyright>Copyright © Eugene Fox 2024</Copyright>
2020
<NeutralLanguage>en-US</NeutralLanguage>
@@ -35,7 +35,7 @@
3535
Feature-rich, fast, and customizable library for implementation TOTP/HOTP authenticators and validators.
3636
</Description>
3737
<PackageReleaseNotes>
38-
(BREAKING CHANGE) Complete overhaul of the library. See https://github.com/XFox111/SimpleOTP/releases/tag/2.0.0 for more details.
38+
New major version for .NET 9
3939
</PackageReleaseNotes>
4040
</PropertyGroup>
4141

0 commit comments

Comments
 (0)