From c17b40fb7d9f20a53cd1806785e87ef7b7269252 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Wed, 9 Aug 2023 13:39:57 +0200 Subject: [PATCH] Create dotnet.yml --- .github/workflows/dotnet.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/dotnet.yml diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml new file mode 100644 index 0000000..806dbf6 --- /dev/null +++ b/.github/workflows/dotnet.yml @@ -0,0 +1,28 @@ +name: .NET + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + dotnet-version: 7.0.x + - name: Build + run: dotnet build -c Release + - name: Pack + run: dotnet pack + - name: Publish the package to nuget.org + if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + run: dotnet nuget push nupkg/*.nupkg -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json + env: + NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}