Skip to content

Publish Nuget Packages #2

Publish Nuget Packages

Publish Nuget Packages #2

Workflow file for this run

name: Publish Nuget Packages
on:
workflow_dispatch:
release:
jobs:
build:
runs-on: ubuntu-latest
steps:
- 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 --no-restore -c Release
- name: Package
run: dotnet pack --no-build
- name: Publish packages
run: dotnet nuget push ".\dist\*.nupkg" --skip-duplicate -s https://api.nuget.org/v3/index.json -k "$NUGET_API_KEY"
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
- name: Publish symbols
run: dotnet nuget push ".\dist\*.snupkg" --skip-duplicate -s https://api.nuget.org/v3/index.json -k "$NUGET_API_KEY"
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}