Skip to content

Commit f1217ed

Browse files
committed
Adjust nuget package artifact
1 parent 51efd2d commit f1217ed

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

.github/workflows/dotnet.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,21 @@ jobs:
5858
- name: Test
5959
run: dotnet test
6060

61-
- name: Upload Package artifact
62-
uses: actions/upload-pages-artifact@v3
61+
- name: Move NuGet Packages
62+
run: mv (Get-ChildItem -Recurse ./ -Include *.nupkg) ./
63+
64+
# Removes the version number from the package name
65+
- name: Rename NuGet Packages
66+
run: Get-ChildItem -Include *.nupkg -Path ./* | Rename-Item -NewName { $_.Name -Replace '\.\d+\.\d+\.\d+.*$','.nupkg' }
67+
68+
# Publish the NuGet package(s) as an artifact, so they can be used in the following jobs
69+
- name: Upload NuGet Packages Artifact
70+
uses: actions/upload-artifact@v4
6371
with:
6472
name: NuGet Packages
65-
path: '**/*.nupkg'
73+
if-no-files-found: error
74+
retention-days: 7
75+
path: ./*.nupkg
6676

6777
# Generate and upload docs
6878
- run: dotnet tool update -g docfx

0 commit comments

Comments
 (0)