Skip to content

v0.1.0

v0.1.0 #10

Workflow file for this run

name: Build and Test
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
release:
types: [ "created" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
- name: Restore Dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-restore --no-build --verbosity normal
release:
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'created'
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
- name: Restore Dependencies
run: dotnet restore
- name: Pack NuGet Package
run: dotnet pack --no-restore -c Release -o ./artifacts
- name: Upload NuGet Artifact
uses: actions/upload-artifact@v4
with:
name: Packages
path: ./artifacts/*.nupkg
- name: Publish to NuGet
env:
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: dotnet nuget push ./artifacts/*.nupkg --source https://api.nuget.org/v3/index.json --api-key $NUGET_API_KEY