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"