From 602926c43e4d9bbba28b4f7a58dc39be1102e835 Mon Sep 17 00:00:00 2001 From: Markus Bender Date: Fri, 2 Feb 2024 19:21:45 +0100 Subject: [PATCH] Create nuget.yml Add Nuget Action --- .github/workflows/nuget.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/nuget.yml diff --git a/.github/workflows/nuget.yml b/.github/workflows/nuget.yml new file mode 100644 index 0000000..8fca6e7 --- /dev/null +++ b/.github/workflows/nuget.yml @@ -0,0 +1,27 @@ +name: Release to NuGet + +on: + push: + branches: + - master # Default release branch + pull_request: + branches: + - master # Run the workflow for all pull requests on Branch Master + +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - name: Checkout + uses: actions/checkout@v4.1.1 + - name: Setup .NET SDK + uses: actions/setup-dotnet@v1.5 + - name: Build + run: dotnet build -c Release + - name: Test + run: dotnet test -c Release --no-build + - name: Pack nugets + run: dotnet pack -c Release --no-build --output . + - name: Push to NuGet + run: dotnet nuget push "*.nupkg" --api-key ${{secrets.NUGET_KEY}} --source https://api.nuget.org/v3/index.json