Features/dotnet 8 #408
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |