Skip to content

Update build yaml (#39) #136

Update build yaml (#39)

Update build yaml (#39) #136

Workflow file for this run

name: Build
on:
workflow_dispatch:
push:
branches: [ main, release/v** ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- uses: actions/checkout@v4
with:
fetch-depth: 0 # depth is needed for nbgv
- uses: dotnet/nbgv@master
with:
setAllVars: true
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore -c Release
- name: Test
run: dotnet test --no-build -l "console;verbosity=normal" -c Release
- name: Pack
if: ${{ success() && !github.base_ref }}
run: |
dotnet pack --no-build --verbosity normal -c Release -o artifacts/
- uses: actions/upload-artifact@v4
if: ${{ success() && !github.base_ref }}
with:
name: artifact
path: artifacts/