Skip to content

Modernize project

Modernize project #83

Workflow file for this run

name: Build
on:
workflow_dispatch:
push:
branches:
- 'master'
paths-ignore:
- '**/readme.md'
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
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
- name: Build
run: dotnet build -c Release --no-restore
- name: Test
run: dotnet test -c Release --no-build --logger GitHubActions
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Package
run: dotnet pack -c Release --no-build -o nupkgs
if: startsWith(github.ref, 'refs/tags/')
- name: Push to Nuget
run: dotnet nuget push "./nupkgs/*.nupkg" --source "https://api.nuget.org/v3/index.json" --api-key ${{ secrets.NUGETPUBLISHKEY }}
if: startsWith(github.ref, 'refs/tags/')