From c7255bc48b5a0b122df7f74510170ff0d375284c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ljubo=20Nikoli=C4=87?= Date: Tue, 30 Jan 2024 11:30:02 +0100 Subject: [PATCH] Add github release publish job --- .github/workflows/dotnet.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/dotnet.yaml b/.github/workflows/dotnet.yaml index cd1c5f9..3d5af7f 100644 --- a/.github/workflows/dotnet.yaml +++ b/.github/workflows/dotnet.yaml @@ -141,3 +141,20 @@ jobs: name: nuget-package - name: Publish to NuGet run: dotnet nuget push "ApiSurface.*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json + + github-release: + runs-on: ubuntu-latest + if: ${{ !github.event.repository.fork && github.ref == 'refs/heads/main' }} + needs: [all-required-checks-complete] + environment: release + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + - name: Download NuGet artifact + uses: actions/download-artifact@v4 + with: + name: nuget-package + - uses: ncipollo/release-action@v1 + with: + artifacts: "ApiSurface/bin/Release/ApiSurface.*.nupkg"