Skip to content

Publish NuGet

Publish NuGet #23

Workflow file for this run

name: Publish NuGet
on: workflow_dispatch
jobs:
publish:
name: Build, Pack & Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --no-restore --verbosity normal
- name: Package
run: dotnet pack -c Release -o bin CrossChannel/CrossChannel.csproj
- name: Publish
run: dotnet nuget push bin/*.nupkg -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json