v2.1.0 - MCPBuckle 2.1.0 Integration & Workflow Improvements #17
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish MCPInvoke to NuGet | |
| on: | |
| release: | |
| types: [published] # Only trigger on GitHub release publication, not tags | |
| jobs: | |
| publish: # Renamed job for clarity | |
| name: Build, Pack & Publish MCPInvoke | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read # Required to checkout the repo | |
| packages: write # Required to publish to nuget.org | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET SDKs | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: | # Installs all specified SDK versions | |
| 6.0.x | |
| 7.0.x | |
| 8.0.x | |
| 9.0.x | |
| - name: Restore dependencies | |
| run: dotnet restore MCPInvoke.sln | |
| - name: Build solution | |
| run: dotnet build MCPInvoke.sln --configuration Release --no-restore | |
| - name: Test | |
| run: dotnet test MCPInvoke.Tests/MCPInvoke.Tests.csproj --no-build --configuration Release --verbosity normal | |
| - name: Pack MCPInvoke | |
| # This packs the MCPInvoke project. Output directory is nupkgs at the repo root. | |
| run: dotnet pack MCPInvoke/MCPInvoke.csproj --no-build --configuration Release --output ./nupkgs | |
| - name: Push MCPInvoke to NuGet.org | |
| run: dotnet nuget push "./nupkgs/*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json | |
| # 'if: success()' is the default, so not strictly needed here. |