Skip to content

Commit

Permalink
Fix .NET SDK mismatches in actions (#147)
Browse files Browse the repository at this point in the history
* Added both .NET 8 and .NET 9 to actions which build the project

* Added missing SDK installs from steps in linting, testing, and packaging steps

* Patch version bump
  • Loading branch information
jamie-taylor-rjj authored Dec 11, 2024
1 parent a2398be commit 101514c
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 9 deletions.
15 changes: 14 additions & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,27 @@ jobs:
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

- if: matrix.build-mode == 'manual'
# The following steps are based on the content from the following URLs:
# https://resources.github.com/learn/pathways/security/intermediate/codeql-advanced-setup/
# https://learn.microsoft.com/en-us/dotnet/devops/dotnet-secure-github-action

# The NuGet package we're building supports both .NET 8 and .NET 9, so we need
# to install both so that we can build the project.
name: Setup .NET SDK 8.0
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
with:
dotnet-version: '8.0.x'

- if: matrix.build-mode == 'manual'
# The following steps are based on the content from the following URLs:
# https://resources.github.com/learn/pathways/security/intermediate/codeql-advanced-setup/
# https://learn.microsoft.com/en-us/dotnet/devops/dotnet-secure-github-action

# We currently (as of December 4th, 2024) need to build manually, because the Ubunutu images
# don't have .NET 9 installed on them.
name: Setup .NET
name: Setup .NET SDK 9.0
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
with:
dotnet-version: '9.0.x'
Expand Down
36 changes: 32 additions & 4 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,14 @@ jobs:
with:
fetch-depth: 1

- name: Setup .NET
# The NuGet package we're building supports both .NET 8 and .NET 9, so we need
# to install both so that we can work with the project.
- name: Setup .NET 8.0
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
with:
dotnet-version: '8.0.x'

- name: Setup .NET SDK 9.0
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
with:
dotnet-version: '9.0.x'
Expand All @@ -48,7 +55,14 @@ jobs:
with:
fetch-depth: 0

- name: Setup .NET SDK
# The NuGet package we're building supports both .NET 8 and .NET 9, so we need
# to install both so that we can build the project.
- name: Setup .NET 8.0
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
with:
dotnet-version: '8.0.x'

- name: Setup .NET SDK 9.0
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
with:
dotnet-version: '9.0.x'
Expand Down Expand Up @@ -76,7 +90,14 @@ jobs:
with:
fetch-depth: 0

- name: Setup .NET SDK
# The NuGet package we're building supports both .NET 8 and .NET 9, so we need
# to install both so that we can run the tests.
- name: Setup .NET 8.0
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
with:
dotnet-version: '8.0.x'

- name: Setup .NET SDK 9.0
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
with:
dotnet-version: '9.0.x'
Expand Down Expand Up @@ -113,7 +134,14 @@ jobs:
with:
fetch-depth: 0

- name: Setup .NET SDK
# The NuGet package we're building supports both .NET 8 and .NET 9, so we need
# to install both so that we can create the NuGet package.
- name: Setup .NET 8.0
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
with:
dotnet-version: '8.0.x'

- name: Setup .NET SDK 9.0
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
with:
dotnet-version: '9.0.x'
Expand Down
27 changes: 24 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,14 @@ jobs:
with:
fetch-depth: 0

- name: Setup .NET SDK
# The NuGet package we're building supports both .NET 8 and .NET 9, so we need
# to install both so that we can build the project.
- name: Setup .NET 8.0
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
with:
dotnet-version: '8.0.x'

- name: Setup .NET SDK 9.0
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
with:
dotnet-version: '9.0.x'
Expand All @@ -49,7 +56,14 @@ jobs:
with:
fetch-depth: 0

- name: Setup .NET SDK
# The NuGet package we're building supports both .NET 8 and .NET 9, so we need
# to install both so that we can test the project.
- name: Setup .NET 8.0
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
with:
dotnet-version: '8.0.x'

- name: Setup .NET SDK 9.0
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
with:
dotnet-version: '9.0.x'
Expand All @@ -69,7 +83,14 @@ jobs:
with:
fetch-depth: 0

- name: Setup .NET SDK
# The NuGet package we're building supports both .NET 8 and .NET 9, so we need
# to install both so that we can create the NuGet package.
- name: Setup .NET 8.0
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
with:
dotnet-version: '8.0.x'

- name: Setup .NET SDK 9.0
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25 # v4.1.0
with:
dotnet-version: '9.0.x'
Expand Down
2 changes: 1 addition & 1 deletion src/OwaspHeaders.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<!-- NuGet metadata -->
<PackageId>OwaspHeaders.Core</PackageId>
<Version>9.4.2</Version>
<Version>9.4.3</Version>
<Authors>Jamie Taylor</Authors>
<Company>RJJ Software Ltd</Company>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
Expand Down

0 comments on commit 101514c

Please sign in to comment.