Skip to content

Publish NuGet Package #1

Publish NuGet Package

Publish NuGet Package #1

Workflow file for this run

name: Publish NuGet Package
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore Throttlr.Api.RateLimit.sln
- name: Build solution
run: dotnet build Throttlr.Api.RateLimit.sln --configuration Release --no-restore
- name: Pack NuGet package
run: dotnet pack src/Throttlr.Api.RateLimit/RateLimit.Throttlr.csproj --configuration Release -o ./artifacts /p:PackageVersion=${{ github.ref_name }}
- name: Publish to NuGet
run: dotnet nuget push ./artifacts/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate