From fba69da06ff775eb36e118537080c90f818b3107 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Fri, 17 Oct 2025 00:04:45 +0000
Subject: [PATCH 1/2] Initial plan
From 4a41ca9030f4b51292fce9e5278bdce6ac8016f4 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Fri, 17 Oct 2025 00:09:46 +0000
Subject: [PATCH 2/2] Add NuGet publishing workflow with OIDC and increment
version to 0.2.0-beta
Co-authored-by: seaniyer <41308619+seaniyer@users.noreply.github.com>
---
.github/workflows/publish-nuget.yml | 38 +++++++++++++++++++++++++++++
ContosoMCP/ContosoMCP.csproj | 2 +-
2 files changed, 39 insertions(+), 1 deletion(-)
create mode 100644 .github/workflows/publish-nuget.yml
diff --git a/.github/workflows/publish-nuget.yml b/.github/workflows/publish-nuget.yml
new file mode 100644
index 0000000..b4150d1
--- /dev/null
+++ b/.github/workflows/publish-nuget.yml
@@ -0,0 +1,38 @@
+name: Publish NuGet Package
+
+on:
+ release:
+ types: [published]
+
+jobs:
+ publish:
+ runs-on: ubuntu-latest
+
+ permissions:
+ id-token: write
+ contents: read
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: '8.0.x'
+
+ - name: Restore dependencies
+ run: dotnet restore
+
+ - name: Build
+ run: dotnet build --configuration Release --no-restore
+
+ - name: Pack
+ run: dotnet pack --configuration Release --no-build --output ./nupkg
+
+ - name: Publish to NuGet.org
+ run: |
+ dotnet nuget push ./nupkg/*.nupkg \
+ --api-key az \
+ --source https://api.nuget.org/v3/index.json \
+ --skip-duplicate
diff --git a/ContosoMCP/ContosoMCP.csproj b/ContosoMCP/ContosoMCP.csproj
index 27b02ba..f214892 100644
--- a/ContosoMCP/ContosoMCP.csproj
+++ b/ContosoMCP/ContosoMCP.csproj
@@ -14,7 +14,7 @@
README.md
ContosoMCPServer
- 0.1.0-beta
+ 0.2.0-beta
AI; MCP; server; stdio
An MCP server using the MCP C# SDK.