Skip to content

Commit

Permalink
Add nuget publish stage.
Browse files Browse the repository at this point in the history
  • Loading branch information
jhett12321 committed Jan 12, 2025
1 parent 69efa11 commit 9052568
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 9052568

Please sign in to comment.