Skip to content

Publish to NuGet

Publish to NuGet #2

Workflow file for this run

name: Publish to NuGet
on:
workflow_dispatch:
permissions:
contents: read
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: Restore, Build, and Pack
run: |
dotnet restore *.sln
dotnet build *.sln --configuration Release --no-restore
dotnet pack *.sln --configuration Release --no-build --output ./artifacts
- name: Publish to NuGet
run: dotnet nuget push ./artifacts/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate