Publish to NuGet #19
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 to NuGet | |
on: | |
release: | |
branches: [ main ] | |
types: [ published ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Setup dotnet tooling | |
uses: actions/setup-dotnet@master | |
with: | |
dotnet-version: '6.0.x' | |
- name: Restore dependencies | |
run: | |
cd src | |
dotnet restore | |
- name: Compile SpiceSharpParser | |
run: dotnet build src\SpiceSharpParser\SpiceSharpParser.csproj --configuration Release --no-restore | |
- name: Publish to NuGet | |
env: | |
APIKEY: ${{ secrets.NUGET_APIKEY }} | |
run: dotnet nuget push src\SpiceSharpParser\bin\Release\SpiceSharp-Parser.*.nupkg -k $env:APIKEY -s "https://api.nuget.org/v3/index.json" | |