Skip to content

Release prep

Release prep #16

Workflow file for this run

name: Build
on:
workflow_dispatch:
inputs:
perform_deploy:
description: "Deploy *.nupkg artifacts to nuget.org"
required: true
type: boolean
push:
branches: [ main ]
tags:
- v*
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- run: git fetch --force --prune --tags
- name: Setup .NET SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: "9.0"
- name: NuGet Restore
run: dotnet restore
- name: Build
run: dotnet build --configuration release --no-restore
- name: Test
run: dotnet test --configuration release --no-restore --no-build
- name: Pack
run: dotnet pack --configuration release --no-restore --no-build
- name: Deploy to nuget.org
if: ${{ inputs.perform_deploy }}
run: dotnet nuget push --api-key ${{secrets.NUGET_PUSH_TOKEN}} --source https://api.nuget.org/v3/index.json --skip-duplicate --no-symbols true _artifacts/*.nupkg