Added CI stuff

This commit is contained in:
2024-07-13 15:38:30 +02:00
parent 7509e6db71
commit 1974bad299
4 changed files with 69 additions and 0 deletions

23
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,23 @@
name: .NET
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .Net SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.x
- name: Build
run: dotnet build -c Release

30
.github/workflows/publish-to-nuget.yml vendored Normal file
View File

@ -0,0 +1,30 @@
name: Publish Nuget Package
on:
push:
tags:
- v*
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .Net SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.x
- name: Build
run: dotnet build -c Release
- name: Make Nuget Packages
run: dotnet pack -c Release
- name: Publish To Nuget
run: dotnet nuget push bin/*.nupkg -k $NUGET_AUTH_TOKEN -s https://api.nuget.org/v3/index.json
env:
NUGET_AUTH_TOKEN: ${{ secrets.NUGET_API_KEY }}