Skip to content

Publish NuGet Package #18

Publish NuGet Package

Publish NuGet Package #18

Workflow file for this run

name: Publish NuGet Package
on:
workflow_dispatch:
push:
tags: [ release-* ]
# TODO: trigger on commit desc '/publish'
# TODO: switch to https://github.com/xoofx/dotnet-releaser
jobs:
publish:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Setup .NET
uses: actions/setup-dotnet@v4.0.0
with:
dotnet-version: 7.0.x
- name: Run tests
run: |
dotnet test --nologo -l:"console;verbosity=normal" -c Release
- name: Pack nuget
run: dotnet pack src\Core\Core.csproj -c Release
- name: Publish NuGet package
run: |
dotnet nuget push publish\Core\*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json