Skip to content

Features/dotnet 8

Features/dotnet 8 #408

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.100
- name: Install dependencies
run: dotnet restore ./src/BlazorInteractive
- name: Install dependencies for unit tests
run: dotnet restore ./tests/BlazorInteractive.Tests
- name: Build
run: dotnet build --nologo --configuration Release --no-restore ./src/BlazorInteractive
- name: Test
run: dotnet test --nologo --no-restore --verbosity normal ./tests/BlazorInteractive.Tests
- name: Pack NuGet package
run: dotnet pack --configuration Release --no-build ./src/BlazorInteractive
- name: Publish NuGet package
if: startsWith(github.ref, 'refs/heads/main')
run: dotnet nuget push ./src/BlazorInteractive/bin/Release/*.nupkg --api-key $NUGET_API_KEY --source https://api.nuget.org/v3/index.json --skip-duplicate