Skip to content

CD

CD #16

Workflow file for this run

name: CD
on:
release:
types: [published]
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.0' # Adjust to your .NET version
- name: Restore dependencies
working-directory: ./src
run: dotnet restore
- name: Build
working-directory: ./src
run: dotnet build --configuration Release --no-restore
- name: Pack
working-directory: ./src
run: dotnet pack --configuration Release --output artifacts
- name: Push to NuGet
working-directory: ./src
run: dotnet nuget push artifacts/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }}