Skip to content

Release to NuGet

Release to NuGet #14

Workflow file for this run

name: Release to NuGet
on:
push:
tags:
- 'v*'
workflow_dispatch:
env:
NUGET_AUTH_TOKEN: ${{secrets.NUGET_API_KEY}}
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
source-url: https://api.nuget.org/v3/index.json
- name: Restore
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Pack
run: dotnet pack --configuration Release --no-build
- name: Push to NuGet
run: dotnet nuget push "bin/Release/*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate