Publish NuGet Package #19
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: 8.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 |