Rename folders, add workflow, trim Duende prefix

This commit is contained in:
Damian Hickey 2025-10-21 11:03:58 +02:00
parent b4d0b7e2d3
commit 9011ddbaf5
26 changed files with 347 additions and 35 deletions

View file

@ -17,6 +17,11 @@ var products = new Product[]
"bff",
["Bff.Tests"],
["Hosts.Tests"]),
new("docs-mcp",
"docs-mcp.slnf",
"dmcp",
[],
[]),
new("identity-server",
"identity-server.slnf",
"is",

View file

@ -128,8 +128,7 @@ jobs:
fetch-depth: 0
codeql:
name: CodeQL analyze
# Remove once https://github.com/github/codeql-action/issues/3207#issuecomment-3405956414 has been resolved
if: false && ((github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) || (github.event_name == 'push') || (github.event_name == 'workflow_dispatch'))
if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) || (github.event_name == 'push') || (github.event_name == 'workflow_dispatch')
runs-on:
group: large
labels: [ubuntu-latest-x64-16core]
@ -148,7 +147,6 @@ jobs:
languages: csharp
build-mode: manual
db-location: ~/.codeql/databases
debug: true
- name: List .net sdks
run: dotnet --list-sdks
- name: Setup Dotnet
@ -161,7 +159,7 @@ jobs:
- name: Restore
run: dotnet restore aspnetcore-authentication-jwtbearer.slnf
- name: Build
run: dotnet build aspnetcore-authentication-jwtbearer.slnf --no-restore --no-incremental -c Release
run: dotnet build aspnetcore-authentication-jwtbearer.slnf --no-restore -c Release
- name: Perform CodeQL Analysis
if: ${{ env.DISABLE_CODEQL_ANALYSIS != 'true' }}
uses: github/codeql-action/analyze@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0

211
.github/workflows/docs-mcp-ci.yml vendored Normal file
View file

@ -0,0 +1,211 @@
# This was generated by tool. Edits will be overwritten.
name: docs-mcp/ci
on:
workflow_dispatch:
push:
paths:
- .config/dotnet-tools.json
- .github/workflows/docs-mcp-**
- docs-mcp/**
- .editorconfig
- Directory.Packages.props
- global.json
- src.props
- test.props
pull_request:
paths:
- .config/dotnet-tools.json
- .github/workflows/docs-mcp-**
- docs-mcp/**
- .editorconfig
- Directory.Packages.props
- global.json
- src.props
- test.props
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
verify-formatting:
name: Verify formatting
if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) || (github.event_name == 'push') || (github.event_name == 'workflow_dispatch')
runs-on:
group: large
labels: [ubuntu-latest-x64-16core]
permissions:
contents: read
defaults:
run:
shell: bash
working-directory: docs-mcp
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: List .net sdks
run: dotnet --list-sdks
- name: Setup Dotnet
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25
with:
dotnet-version: |-
8.0.x
9.0.203
10.0.100-rc.2.25502.107
- name: Restore
run: dotnet restore docs-mcp.slnf
- name: Verify Formatting
run: dotnet format docs-mcp.slnf --verify-no-changes --no-restore
build:
name: Build and test (unit)
if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) || (github.event_name == 'push') || (github.event_name == 'workflow_dispatch')
runs-on: ubuntu-latest
permissions:
actions: read
checks: write
contents: read
packages: write
defaults:
run:
shell: bash
working-directory: docs-mcp
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: List .net sdks
run: dotnet --list-sdks
- name: Setup Dotnet
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25
with:
dotnet-version: |-
8.0.x
9.0.203
10.0.100-rc.2.25502.107
- name: Restore
run: dotnet restore docs-mcp.slnf
- name: Build
run: dotnet build docs-mcp.slnf --no-restore -c Release
- name: Dotnet devcerts
run: dotnet dev-certs https --trust
playwright:
name: Playwright tests
if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) || (github.event_name == 'push') || (github.event_name == 'workflow_dispatch')
runs-on:
group: large
labels: [ubuntu-latest-x64-16core]
permissions:
actions: read
checks: write
contents: read
defaults:
run:
shell: bash
working-directory: docs-mcp
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
codeql:
name: CodeQL analyze
if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) || (github.event_name == 'push') || (github.event_name == 'workflow_dispatch')
runs-on:
group: large
labels: [ubuntu-latest-x64-16core]
defaults:
run:
shell: bash
working-directory: docs-mcp
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Initialize CodeQL
uses: github/codeql-action/init@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0
with:
languages: csharp
build-mode: manual
db-location: ~/.codeql/databases
- name: List .net sdks
run: dotnet --list-sdks
- name: Setup Dotnet
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25
with:
dotnet-version: |-
8.0.x
9.0.203
10.0.100-rc.2.25502.107
- name: Restore
run: dotnet restore docs-mcp.slnf
- name: Build
run: dotnet build docs-mcp.slnf --no-restore -c Release
- name: Perform CodeQL Analysis
if: ${{ env.DISABLE_CODEQL_ANALYSIS != 'true' }}
uses: github/codeql-action/analyze@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0
with:
category: /language:csharp
pack:
name: Pack, sign and push
if: (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) || (github.event_name == 'push') || (github.event_name == 'workflow_dispatch')
needs:
- verify-formatting
- build
- playwright
- codeql
runs-on:
group: large
labels: [ubuntu-latest-x64-16core]
permissions:
actions: read
contents: read
packages: write
defaults:
run:
shell: bash
working-directory: docs-mcp
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: List .net sdks
run: dotnet --list-sdks
- name: Setup Dotnet
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25
with:
dotnet-version: |-
8.0.x
9.0.203
10.0.100-rc.2.25502.107
- name: Tool restore
run: dotnet tool restore
- name: Pack docs-mcp.slnf
run: dotnet pack -c Release docs-mcp.slnf -o artifacts
- name: Sign packages
if: github.event == 'push'
run: |-
for file in artifacts/*.nupkg; do
dotnet NuGetKeyVaultSignTool sign "$file" --file-digest sha256 --timestamp-rfc3161 http://timestamp.digicert.com --azure-key-vault-url https://duendecodesigninghsm.vault.azure.net/ --azure-key-vault-client-id 18e3de68-2556-4345-8076-a46fad79e474 --azure-key-vault-tenant-id ed3089f0-5401-4758-90eb-066124e2d907 --azure-key-vault-client-secret ${{ secrets.SignClientSecret }} --azure-key-vault-certificate NuGetPackageSigning
done
- name: Push packages to GitHub
if: github.ref == 'refs/heads/main'
run: dotnet nuget push artifacts/*.nupkg --source https://nuget.pkg.github.com/DuendeSoftware/index.json --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Artifacts
if: github.ref == 'refs/heads/main'
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
name: artifacts
path: docs-mcp/artifacts/*.nupkg
overwrite: true
retention-days: 15

118
.github/workflows/docs-mcp-release.yml vendored Normal file
View file

@ -0,0 +1,118 @@
# This was generated by tool. Edits will be overwritten.
name: docs-mcp/release
on:
workflow_dispatch:
inputs:
version:
description: 'Version in format X.Y.Z, X.Y.Z-preview.N, or X.Y.Z-rc.N'
type: string
required: true
default: '0.0.0'
branch:
description: '(Optional) the name of the branch to release from'
type: string
required: false
default: 'main'
remove-tag-if-exists:
description: 'If set, will remove the existing tag. Use this if you have issues with the previous release action'
type: boolean
required: false
default: false
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
tag:
name: Tag and Pack
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
defaults:
run:
shell: bash
working-directory: docs-mcp
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Validate Version Input
run: echo '${{ github.event.inputs.version }}' | grep -P '^\d+\.\d+\.\d+(-preview\.\d+|-rc\.\d+)?$' || (echo 'Invalid version format' && exit 1)
- name: Checkout target branch
if: github.event.inputs.branch != 'main'
run: git checkout ${{ github.event.inputs.branch }}
- name: Git Config
run: |-
git config --global user.email "github-bot@duendesoftware.com"
git config --global user.name "Duende Software GitHub Bot"
- name: Git Config
if: github.event.inputs['remove-tag-if-exists'] == 'true'
run: |-
if git rev-parse dmcp-${{ github.event.inputs.version }} >/dev/null 2>&1; then
git tag -d dmcp-${{ github.event.inputs.version }}
git push --delete origin dmcp-${{ github.event.inputs.version }}
else
echo 'Tag dmcp-${{ github.event.inputs.version }} does not exist.'
fi
- name: Git Config
run: |-
git tag -a dmcp-${{ github.event.inputs.version }} -m "Release v${{ github.event.inputs.version }}"
git push origin dmcp-${{ github.event.inputs.version }}
- name: List .net sdks
run: dotnet --list-sdks
- name: Setup Dotnet
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25
with:
dotnet-version: |-
8.0.x
9.0.203
10.0.100-rc.2.25502.107
- name: Pack docs-mcp.slnf
run: dotnet pack -c Release docs-mcp.slnf -o artifacts
- name: Tool restore
run: dotnet tool restore
- name: Sign packages
run: |-
for file in artifacts/*.nupkg; do
dotnet NuGetKeyVaultSignTool sign "$file" --file-digest sha256 --timestamp-rfc3161 http://timestamp.digicert.com --azure-key-vault-url https://duendecodesigninghsm.vault.azure.net/ --azure-key-vault-client-id 18e3de68-2556-4345-8076-a46fad79e474 --azure-key-vault-tenant-id ed3089f0-5401-4758-90eb-066124e2d907 --azure-key-vault-client-secret ${{ secrets.SignClientSecret }} --azure-key-vault-certificate NuGetPackageSigning
done
- name: Push packages to GitHub
run: dotnet nuget push artifacts/*.nupkg --source https://nuget.pkg.github.com/DuendeSoftware/index.json --api-key ${{ secrets.GITHUB_TOKEN }} --skip-duplicate
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUGET_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
name: artifacts
path: docs-mcp/artifacts/*.nupkg
overwrite: true
retention-days: 15
publish:
name: Publish to nuget.org
needs:
- tag
runs-on: ubuntu-latest
environment:
name: nuget.org
steps:
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
with:
name: artifacts
path: artifacts
- name: List .net sdks
run: dotnet --list-sdks
- name: Setup Dotnet
uses: actions/setup-dotnet@3e891b0cb619bf60e2c25674b222b8940e2c1c25
with:
dotnet-version: |-
8.0.x
9.0.203
10.0.100-rc.2.25502.107
- name: List files
run: tree
shell: bash
- name: Push packages to nuget.org
run: dotnet nuget push artifacts/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_ORG_API_KEY }} --skip-duplicate

View file

@ -1,29 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Duende.Documentation.Mcp.Server", "src\Duende.Documentation.Mcp.Server\Duende.Documentation.Mcp.Server.csproj", "{77ABDCC6-CE90-48DB-92F9-C5196A4A703A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "_", "_", "{043ECBC2-3F36-41B3-97FA-B89C91ECEEF8}"
ProjectSection(SolutionItems) = preProject
README.md = README.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".config", ".config", "{67AE9E59-B4E8-4D11-BA48-2228BFB217D6}"
ProjectSection(SolutionItems) = preProject
.config\dotnet-tools.json = .config\dotnet-tools.json
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{77ABDCC6-CE90-48DB-92F9-C5196A4A703A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{77ABDCC6-CE90-48DB-92F9-C5196A4A703A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{77ABDCC6-CE90-48DB-92F9-C5196A4A703A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{77ABDCC6-CE90-48DB-92F9-C5196A4A703A}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{67AE9E59-B4E8-4D11-BA48-2228BFB217D6} = {043ECBC2-3F36-41B3-97FA-B89C91ECEEF8}
EndGlobalSection
EndGlobal

9
docs-mcp/docs-mcp.slnf Normal file
View file

@ -0,0 +1,9 @@
{
"solution": {
"path": "..\\products.slnx",
"projects": [
".github\\workflow-gen\\workflow-gen.csproj",
"docs-mcp\\src\\Documentation.Mcp\\Documentation.Mcp.csproj"
]
}
}

View file

@ -7,7 +7,7 @@
<AnalysisMode>All</AnalysisMode>
<PackageTags>OAuth 2.0;OpenID Connect;Security;Identity;IdentityServer;ASP.NET Core</PackageTags>
<Product>Duende Documentation MCP Server</Product>
<MinVerTagPrefix>mcp-</MinVerTagPrefix>
<MinVerTagPrefix>dmcp-</MinVerTagPrefix>
<MinVerMinimumMajorMinor>1.0</MinVerMinimumMajorMinor>
</PropertyGroup>
</Project>

View file

@ -74,7 +74,7 @@
<Project Path="bff/test/Hosts.Tests/Hosts.Tests.csproj" />
</Folder>
<Folder Name="/docs-mcp/">
<Project Path="docs-mcp\src\Duende.Documentation.Mcp.Server\Duende.Documentation.Mcp.Server.csproj" Type="Classic C#">
<Project Path="docs-mcp\src\Documentation.Mcp\Documentation.Mcp.csproj" >
<Configuration Solution="Debug|x64" Project="Debug|Any CPU" />
<Configuration Solution="Debug|x86" Project="Debug|Any CPU" />
<Configuration Solution="Release|x64" Project="Release|Any CPU" />