Skip to content

fix build

fix build #26

Workflow file for this run

name: Build, Test, and Deploy
on: [push, release, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Setup .NET
uses: actions/setup-dotnet@v6
with:
dotnet-version: 10.0.x
- name: NuGet login
uses: NuGet/login@v1
id: login
with:
user: ${{secrets.NUGET_USER}}
- name: Build
run: dotnet build --configuration Release
- name: Run tests
run: dotnet test --no-build --configuration Release
- name: Pack
run: dotnet pack src --no-build --configuration Release --output ./nupkg
- name: Publish to NuGet
if: startsWith(github.ref, 'refs/tags/')
run: dotnet nuget push ./nupkg/*.nupkg -s https://api.nuget.org/v3/index.json --api-key ${{steps.login.NUGET_API_KEY}}