From d0631f935e93e2490790ae38e4b174b46beb54fd Mon Sep 17 00:00:00 2001 From: Stuart Meeks Date: Mon, 8 Jun 2026 08:41:53 +0000 Subject: [PATCH] Fix importer NuGet push: resolve the .nupkg explicitly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The push step relied on shell glob expansion of nuget/*.nupkg, but the step runs under PowerShell, which does not expand wildcards for native commands, and 'dotnet nuget push' takes the pattern literally — so it failed with 'File does not exist (nuget/*.nupkg)' while the package sat in nuget/. Resolve the package with Get-ChildItem and push its full path instead. Co-Authored-By: Claude Opus 4.8 --- .github/workflows/release.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c00f6d4..201a3bc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -130,4 +130,11 @@ jobs: run: dotnet pack tools/Snipdeck.Importer/Snipdeck.Importer.csproj --configuration Release --no-restore --output nuget - name: Push snipdeck-importer to NuGet.org - run: dotnet nuget push "nuget/*.nupkg" --api-key "${{ secrets.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate + # Resolve the package explicitly — PowerShell does not glob-expand + # arguments to native commands, and `dotnet nuget push` treats the + # pattern literally, so "nuget/*.nupkg" fails with "File does not exist". + shell: pwsh + run: | + $pkg = Get-ChildItem nuget -Filter *.nupkg | Select-Object -First 1 + if (-not $pkg) { Write-Error "No .nupkg found in nuget/"; exit 1 } + dotnet nuget push $pkg.FullName --api-key "${{ secrets.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate