Skip to content

πŸš€ Publish NuGet Package #3

πŸš€ Publish NuGet Package

πŸš€ Publish NuGet Package #3

Workflow file for this run

name: πŸš€ Publish NuGet Package
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: 🧾 Checkout code
uses: actions/checkout@v4
- name: πŸ›  Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.x'
- name: πŸ” Restore dependencies
run: dotnet restore
- name: πŸ›  Build solution
run: dotnet build --configuration Release
- name: πŸ“¦ Pack NuGet package for ${{ github.event.repository.name }}
run: dotnet pack ./src/**/*.csproj --configuration Release --output ./nupkg
- name: πŸš€ Publish to NuGet.org
run: dotnet nuget push ./nupkg/*.nupkg --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NuGet_API_Key }} #