From dac9c9f098936390d07de83b6520402f453d531e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ljubo=20Nikoli=C4=87?= Date: Fri, 19 Jan 2024 18:16:01 +0000 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"