Skip to content

cd_main_nuget

cd_main_nuget #39

Workflow file for this run

# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: cd_main_nuget
on:
workflow_dispatch
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
7.0.x
8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore --configuration release /p:GeneratePackageOnBuild=true /p:PublicRelease=true
- name: Publish package to Nuget.org
run: dotnet nuget push **/*.nupkg --api-key ${{ secrets.NUGET_API_KEY_GITHUB_CD_WINAPI }} --source https://api.nuget.org/v3/index.json