NuGet Push #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: NuGet Push | |
on: | |
workflow_run: | |
workflows: [Tests] | |
types: | |
- completed | |
defaults: | |
run: | |
working-directory: src | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: | | |
8.0.x | |
9.0.x | |
- name: Build & Pack NuGet Package(s) | |
run: dotnet pack -c Release --output ~/nuget-packages | |
- name: Upload Build Artifact(s) | |
uses: actions/upload-artifact@v4 | |
with: | |
name: nuget-packages | |
path: ~/nuget-packages | |
- name: Push NuGet Package(s) | |
run: dotnet nuget push ~/nuget-packages/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate |