diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 89e6a3e..63ffd82 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -148,3 +148,28 @@ jobs: run: | gh release create ${{ needs.build.outputs.tag }} --title "Release ${{ needs.build.outputs.version }}" gh release upload ${{ needs.build.outputs.tag }} NWNX.NET.zip + + nuget: + runs-on: ubuntu-latest + if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' + needs: build + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + global-json-file: global.json + + - name: Download Release Artifacts + uses: actions/download-artifact@v4 + with: + name: Binaries + path: bin/Release + + - name: NuGet Publish + run: dotnet nuget push bin/Release/*.nupkg --api-key ${{ secrets.NUGET_KEY }} --source https://api.nuget.org/v3/index.json + + - name: GitHub Publish + run: dotnet nuget push bin/Release/*.nupkg --api-key ${{ secrets.GITHUB_TOKEN }} --source https://nuget.pkg.github.com/nwn-dotnet/index.json