Skip to content

Commit fb0edcf

Browse files
esskarclaude
andcommitted
fix(ci): resolve nupkg paths before pushing to NuGet
dotnet nuget push received the literal glob "artifacts/*.nupkg" because neither it nor PowerShell expands wildcard arguments, so the push failed with "File does not exist". Enumerate the packages with Get-ChildItem and push each resolved path; the matching .snupkg is pushed automatically. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 74a04c1 commit fb0edcf

1 file changed

Lines changed: 11 additions & 5 deletions

File tree

.github/workflows/build.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,14 @@ jobs:
6060
- name: Publish to NuGet
6161
# Deploy only on pushes to main (mirrors the previous AppVeyor behaviour).
6262
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
63-
run: >
64-
dotnet nuget push "artifacts/*.nupkg"
65-
--api-key ${{ steps.nuget-login.outputs.NUGET_API_KEY }}
66-
--source https://api.nuget.org/v3/index.json
67-
--skip-duplicate
63+
shell: pwsh
64+
# Expand the glob explicitly: neither dotnet nuget push nor PowerShell
65+
# expands a wildcard argument, so pass each resolved file path. The
66+
# matching .snupkg is pushed automatically alongside its .nupkg.
67+
run: |
68+
Get-ChildItem artifacts -Filter *.nupkg | ForEach-Object {
69+
dotnet nuget push $_.FullName `
70+
--api-key ${{ steps.nuget-login.outputs.NUGET_API_KEY }} `
71+
--source https://api.nuget.org/v3/index.json `
72+
--skip-duplicate
73+
}

0 commit comments

Comments
 (0)