Skip to content

Commit

Permalink
Add artifact publishing and downloading steps to NuGet workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
penyland committed Jan 30, 2025
1 parent b7f8514 commit 156ef64
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/nuget-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.0.x"

- name: Setup .NET 9
uses: actions/setup-dotnet@v4
with:
Expand All @@ -43,6 +43,14 @@ jobs:
- name: Pack
run: dotnet pack --configuration Release --no-build --output ./nupkgs

- name: Publish
uses: actions/upload-artifact@v4
with:
name: nuget-packages
if-no-files-found: error
retention-days: 7
path: ./nupkgs/*.nupkg

publish-nuget:
needs: build-and-test
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.publish_to_nuget == 'true')
Expand All @@ -51,6 +59,11 @@ jobs:
steps:
- uses: actions/checkout@v4

- uses: actions/download-artifact@v2
with:
name: nuget-packages
path: ./nupkgs

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
Expand Down

0 comments on commit 156ef64

Please sign in to comment.