diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 6c64412..001c848 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -108,8 +108,6 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v5
- with:
- token: ${{ secrets.PAT_FOR_TAGGING }}
- name: Configure Git
run: >-
git config user.name "GitHub Action"
@@ -171,7 +169,9 @@ jobs:
${{ steps.extract_package_release_notes.outputs.package_release_notes }}
env:
- GITHUB_TOKEN: ${{ secrets.PAT_FOR_TAGGING }}
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ permissions:
+ contents: write
publish:
name: Publish to NuGet
runs-on: ubuntu-latest
@@ -191,5 +191,13 @@ jobs:
run: dotnet build --no-restore --configuration Release
- name: Pack NuGet Package
run: dotnet pack --configuration Release --include-symbols
+ - name: NuGet Login
+ id: nuget_login
+ uses: NuGet/login@v1
+ with:
+ user: ${{ secrets.NUGET_USER }}
- name: Push NuGet Package
- run: dotnet nuget push **/bin/Release/**/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_ACCESS }} --skip-duplicate
+ run: dotnet nuget push **/bin/Release/**/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ steps.nuget_login.outputs.NUGET_API_KEY }} --skip-duplicate
+ permissions:
+ id-token: write
+ contents: read
diff --git a/.github/workflows/prLinter.yml b/.github/workflows/prLinter.yml
index 6785565..427a79d 100644
--- a/.github/workflows/prLinter.yml
+++ b/.github/workflows/prLinter.yml
@@ -22,27 +22,84 @@ jobs:
script: >-
const prefixes = [
'INFRA:',
+ 'MINOR INFRA:',
+ 'MEDIUM INFRA:',
+ 'MAJOR INFRA:',
'PROVISIONS:',
'RELEASES:',
'DATA:',
+ 'MINOR DATA:',
+ 'MEDIUM DATA:',
+ 'MAJOR DATA:',
'BROKERS:',
+ 'MINOR BROKERS:',
+ 'MEDIUM BROKERS:',
+ 'MAJOR BROKERS:',
'FOUNDATIONS:',
+ 'MINOR FOUNDATIONS:',
+ 'MEDIUM FOUNDATIONS:',
+ 'MAJOR FOUNDATIONS:',
'PROCESSINGS:',
+ 'MINOR PROCESSINGS:',
+ 'MEDIUM PROCESSINGS:',
+ 'MAJOR PROCESSINGS:',
'ORCHESTRATIONS:',
+ 'MINOR ORCHESTRATIONS:',
+ 'MEDIUM ORCHESTRATIONS:',
+ 'MAJOR ORCHESTRATIONS:',
'COORDINATIONS:',
+ 'MINOR COORDINATIONS:',
+ 'MEDIUM COORDINATIONS:',
+ 'MAJOR COORDINATIONS:',
'MANAGEMENTS:',
+ 'MINOR MANAGEMENTS:',
+ 'MEDIUM MANAGEMENTS:',
+ 'MAJOR MANAGEMENTS:',
'AGGREGATIONS:',
+ 'MINOR AGGREGATIONS:',
+ 'MEDIUM AGGREGATIONS:',
+ 'MAJOR AGGREGATIONS:',
'CONTROLLERS:',
+ 'MINOR CONTROLLERS:',
+ 'MEDIUM CONTROLLERS:',
+ 'MAJOR CONTROLLERS:',
'CLIENTS:',
+ 'MINOR CLIENTS:',
+ 'MEDIUM CLIENTS:',
+ 'MAJOR CLIENTS:',
'EXPOSERS:',
+ 'MINOR EXPOSERS:',
+ 'MEDIUM EXPOSERS:',
+ 'MAJOR EXPOSERS:',
'PROVIDERS:',
'BASE:',
+ 'MINOR BASE:',
+ 'MEDIUM BASE:',
+ 'MAJOR BASE:',
'COMPONENTS:',
+ 'MINOR COMPONENTS:',
+ 'MEDIUM COMPONENTS:',
+ 'MAJOR COMPONENTS:',
'VIEWS:',
+ 'MINOR VIEWS:',
+ 'MEDIUM VIEWS:',
+ 'MAJOR VIEWS:',
'PAGES:',
+ 'MINOR PAGES:',
+ 'MEDIUM PAGES:',
+ 'MAJOR PAGES:',
'ACCEPTANCE:',
+ 'MINOR ACCEPTANCE:',
+ 'MEDIUM ACCEPTANCE:',
+ 'MAJOR ACCEPTANCE:',
'INTEGRATIONS:',
+ 'MINOR INTEGRATIONS:',
+ 'MEDIUM INTEGRATIONS:',
+ 'MAJOR INTEGRATIONS:',
'CODE RUB:',
+ 'MINOR CODE RUB:',
+ 'MEDIUM CODE RUB:',
+ 'MAJOR CODE RUB:',
'MINOR FIX:',
'MEDIUM FIX:',
'MAJOR FIX:',
@@ -50,7 +107,23 @@ jobs:
'CONFIG:',
'STANDARD:',
'DESIGN:',
- 'BUSINESS:'
+ 'MINOR DESIGN:',
+ 'MEDIUM DESIGN:',
+ 'MAJOR DESIGN:',
+ 'BUSINESS:',
+ 'MIGRATIONS:',
+ 'PLANNING:',
+ 'MINOR PLANNING:',
+ 'MAJOR PLANNING:',
+ 'MENTORSHIP:',
+ 'MINOR MENTORSHIP:',
+ 'MAJOR MENTORSHIP:',
+ 'DISCUSSION:',
+ 'MINOR DISCUSSION:',
+ 'MAJOR DISCUSSION:',
+ 'IMPORTS:',
+ 'REVIEWS:',
+ 'STATUS:'
];
@@ -162,12 +235,16 @@ jobs:
console.log(`Assigning PR to author: ${author}`);
- await github.rest.issues.addAssignees({
- owner: context.repo.owner,
- repo: context.repo.repo,
- issue_number: pr.number,
- assignees: [author]
- });
+ try {
+ await github.rest.issues.addAssignees({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ issue_number: pr.number,
+ assignees: [author]
+ });
+ } catch (error) {
+ console.log(`Unable to assign ${author} as PR assignee: ${error.message}`);
+ }
permissions:
contents: read
issues: write
diff --git a/NHSDigital.ApiPlatform.Infrastructure/NHSDigital.ApiPlatform.Infrastructure.csproj b/NHSDigital.ApiPlatform.Infrastructure/NHSDigital.ApiPlatform.Infrastructure.csproj
index 1eec01c..dcf3b39 100644
--- a/NHSDigital.ApiPlatform.Infrastructure/NHSDigital.ApiPlatform.Infrastructure.csproj
+++ b/NHSDigital.ApiPlatform.Infrastructure/NHSDigital.ApiPlatform.Infrastructure.csproj
@@ -9,7 +9,7 @@
-
+
diff --git a/NHSDigital.ApiPlatform.Infrastructure/Services/ScriptGenerationService.cs b/NHSDigital.ApiPlatform.Infrastructure/Services/ScriptGenerationService.cs
index 6d9ba1d..afd5148 100644
--- a/NHSDigital.ApiPlatform.Infrastructure/Services/ScriptGenerationService.cs
+++ b/NHSDigital.ApiPlatform.Infrastructure/Services/ScriptGenerationService.cs
@@ -95,11 +95,10 @@ public void GenerateBuildScript(string branchName, string projectName, string do
},
{
"add_tag",
- new TagJobV2(
+ new TagJobV3(
runsOn: BuildMachines.UbuntuLatest,
dependsOn: "build",
projectRelativePath: $"{projectName}/{projectName}.csproj",
- githubToken: "${{ secrets.PAT_FOR_TAGGING }}",
branchName: branchName)
{
Name = "Tag and Release"
@@ -107,11 +106,11 @@ public void GenerateBuildScript(string branchName, string projectName, string do
},
{
"publish",
- new PublishJobV4(
+ new NugetTrustedPublishingJob(
runsOn: BuildMachines.UbuntuLatest,
dependsOn: "add_tag",
dotNetVersion: dotNetVersion,
- nugetApiKey: "${{ secrets.NUGET_ACCESS }}")
+ nugetUser: "${{ secrets.NUGET_USER }}")
{
Name = "Publish to NuGet"
}
diff --git a/NHSDigital.ApiPlatform.Sdk.AspNetCore.Tests.Acceptance/NHSDigital.ApiPlatform.Sdk.AspNetCore.Tests.Acceptance.csproj b/NHSDigital.ApiPlatform.Sdk.AspNetCore.Tests.Acceptance/NHSDigital.ApiPlatform.Sdk.AspNetCore.Tests.Acceptance.csproj
index b7af6d6..7ceb8e3 100644
--- a/NHSDigital.ApiPlatform.Sdk.AspNetCore.Tests.Acceptance/NHSDigital.ApiPlatform.Sdk.AspNetCore.Tests.Acceptance.csproj
+++ b/NHSDigital.ApiPlatform.Sdk.AspNetCore.Tests.Acceptance/NHSDigital.ApiPlatform.Sdk.AspNetCore.Tests.Acceptance.csproj
@@ -10,15 +10,15 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
-
+
all
diff --git a/NHSDigital.ApiPlatform.Sdk.AspNetCore.Tests.Integration/NHSDigital.ApiPlatform.Sdk.AspNetCore.Tests.Integration.csproj b/NHSDigital.ApiPlatform.Sdk.AspNetCore.Tests.Integration/NHSDigital.ApiPlatform.Sdk.AspNetCore.Tests.Integration.csproj
index d620569..0684414 100644
--- a/NHSDigital.ApiPlatform.Sdk.AspNetCore.Tests.Integration/NHSDigital.ApiPlatform.Sdk.AspNetCore.Tests.Integration.csproj
+++ b/NHSDigital.ApiPlatform.Sdk.AspNetCore.Tests.Integration/NHSDigital.ApiPlatform.Sdk.AspNetCore.Tests.Integration.csproj
@@ -10,21 +10,21 @@
-
+
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
-
+
+
+
+
-
+
all
diff --git a/NHSDigital.ApiPlatform.Sdk.AspNetCore.Tests.Unit/NHSDigital.ApiPlatform.Sdk.AspNetCore.Tests.Unit.csproj b/NHSDigital.ApiPlatform.Sdk.AspNetCore.Tests.Unit/NHSDigital.ApiPlatform.Sdk.AspNetCore.Tests.Unit.csproj
index 5d7f6e0..951f20a 100644
--- a/NHSDigital.ApiPlatform.Sdk.AspNetCore.Tests.Unit/NHSDigital.ApiPlatform.Sdk.AspNetCore.Tests.Unit.csproj
+++ b/NHSDigital.ApiPlatform.Sdk.AspNetCore.Tests.Unit/NHSDigital.ApiPlatform.Sdk.AspNetCore.Tests.Unit.csproj
@@ -10,14 +10,14 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
-
+
diff --git a/NHSDigital.ApiPlatform.Sdk.Tests.Acceptance/NHSDigital.ApiPlatform.Sdk.Tests.Acceptance.csproj b/NHSDigital.ApiPlatform.Sdk.Tests.Acceptance/NHSDigital.ApiPlatform.Sdk.Tests.Acceptance.csproj
index 5796ddc..56d2c27 100644
--- a/NHSDigital.ApiPlatform.Sdk.Tests.Acceptance/NHSDigital.ApiPlatform.Sdk.Tests.Acceptance.csproj
+++ b/NHSDigital.ApiPlatform.Sdk.Tests.Acceptance/NHSDigital.ApiPlatform.Sdk.Tests.Acceptance.csproj
@@ -10,15 +10,15 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
-
+
all
diff --git a/NHSDigital.ApiPlatform.Sdk.Tests.Integration/NHSDigital.ApiPlatform.Sdk.Tests.Integration.csproj b/NHSDigital.ApiPlatform.Sdk.Tests.Integration/NHSDigital.ApiPlatform.Sdk.Tests.Integration.csproj
index b4dd554..613afdd 100644
--- a/NHSDigital.ApiPlatform.Sdk.Tests.Integration/NHSDigital.ApiPlatform.Sdk.Tests.Integration.csproj
+++ b/NHSDigital.ApiPlatform.Sdk.Tests.Integration/NHSDigital.ApiPlatform.Sdk.Tests.Integration.csproj
@@ -10,21 +10,21 @@
-
+
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
-
-
-
+
+
+
+
-
+
all
diff --git a/NHSDigital.ApiPlatform.Sdk.Tests.Unit/NHSDigital.ApiPlatform.Sdk.Tests.Unit.csproj b/NHSDigital.ApiPlatform.Sdk.Tests.Unit/NHSDigital.ApiPlatform.Sdk.Tests.Unit.csproj
index b9f5681..f5eac9a 100644
--- a/NHSDigital.ApiPlatform.Sdk.Tests.Unit/NHSDigital.ApiPlatform.Sdk.Tests.Unit.csproj
+++ b/NHSDigital.ApiPlatform.Sdk.Tests.Unit/NHSDigital.ApiPlatform.Sdk.Tests.Unit.csproj
@@ -10,14 +10,14 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
-
+
diff --git a/NHSDigital.ApiPlatform.Sdk/NHSDigital.ApiPlatform.Sdk.csproj b/NHSDigital.ApiPlatform.Sdk/NHSDigital.ApiPlatform.Sdk.csproj
index 8ebff08..979a50b 100644
--- a/NHSDigital.ApiPlatform.Sdk/NHSDigital.ApiPlatform.Sdk.csproj
+++ b/NHSDigital.ApiPlatform.Sdk/NHSDigital.ApiPlatform.Sdk.csproj
@@ -63,9 +63,9 @@
-
-
-
+
+
+