Skip to content

Commit 4f01daf

Browse files
committed
Fix nuget push step
1 parent 99932f9 commit 4f01daf

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/publish.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,10 @@ jobs:
4343
user: ${{ secrets.NUGET_USER }}
4444

4545
- name: NuGet push
46-
run: dotnet nuget push artifacts/*.nupkg --api-key ${{steps.login.outputs.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json
46+
run: |
47+
$packages = Get-ChildItem -Path artifacts/*.nupkg
48+
if ($packages.Count -ne 1) {
49+
throw "Expected exactly 1 package, found $($packages.Count)"
50+
}
51+
dotnet nuget push $packages[0].FullName --api-key ${{steps.login.outputs.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json
52+
shell: pwsh

0 commit comments

Comments
 (0)