Skip to content

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: Publish NuGet Package
on:
push:
tags:
- "v*.*.*"
jobs:
build:
name: Publish NuGet Package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore src/
- name: Build
run: dotnet build --no-restore src --configuration Release
- name: Test
run: dotnet test --no-build --verbosity normal src --configuration Release
- name: Publish the package to NuGet
run: dotnet nuget push src/Sudoku/bin/Release/*.nupkg -k ${{secrets.NUGET_KEY}} -s https://api.nuget.org/v3/index.json --skip-duplicate