Skip to content

Commit 6d5764b

Browse files
Fix mixed path separators in NuGet push on Windows (#393)
Use PowerShell with $env:GITHUB_WORKSPACE and backslash separators for dotnet nuget push. Use relative paths for GitHub Release action which handles glob expansion internally.
1 parent 696d0f0 commit 6d5764b

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

.github/workflows/release.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,17 +70,18 @@ jobs:
7070
-v Information
7171
7272
- name: Push to NuGet.org
73-
run: >
74-
dotnet nuget push "${{ github.workspace }}/bin/nuget/*.nupkg"
75-
--api-key ${{ secrets.NUGET_API_KEY }}
76-
--source https://api.nuget.org/v3/index.json
77-
--skip-duplicate
73+
shell: pwsh
74+
run: |
75+
dotnet nuget push "$env:GITHUB_WORKSPACE\bin\nuget\*.nupkg" `
76+
--api-key ${{ secrets.NUGET_API_KEY }} `
77+
--source https://api.nuget.org/v3/index.json `
78+
--skip-duplicate
7879
7980
- name: Create GitHub Release
8081
uses: softprops/action-gh-release@v2
8182
with:
8283
name: "TurboMqtt v${{ steps.version.outputs.version }}"
8384
body_path: RELEASE_NOTES.md
8485
files: |
85-
${{ github.workspace }}/bin/nuget/*.nupkg
86-
${{ github.workspace }}/bin/nuget/*.snupkg
86+
bin/nuget/*.nupkg
87+
bin/nuget/*.snupkg

0 commit comments

Comments
 (0)