Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/publish-nuget.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion ContosoMCP/ContosoMCP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<!-- Set recommended package metadata -->
<PackageReadmeFile>README.md</PackageReadmeFile>
<PackageId>ContosoMCPServer</PackageId>
<PackageVersion>0.1.0-beta</PackageVersion>
<PackageVersion>0.2.0-beta</PackageVersion>
<PackageTags>AI; MCP; server; stdio</PackageTags>
<Description>An MCP server using the MCP C# SDK.</Description>
</PropertyGroup>
Expand Down
Loading