Skip to content

Commit 5026359

Browse files
author
Martin Boje Carpentier
committed
There is no support for wildcard in the dotnet nuget push command, so i edited the command, to first retrieve the most recent nupkg package using Get-ChildItem which supports wildcards, and then push the result
1 parent 220e601 commit 5026359

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
deploy:
2222
name: 'Deploy to Nuget'
2323
if: github.event_name == 'release'
24-
runs-on: ubuntu-20.04
24+
runs-on: windows-2019
2525

2626
steps:
2727
- uses: actions/checkout@v2
@@ -48,4 +48,8 @@ jobs:
4848
}
4949
dotnet pack -v normal -c Release --include-symbols --include-source -p:PackageVersion=$VERSION -o nupkg src/${{ env.PROJECT_NAME }}/${{ env.PROJECT_NAME }}.csproj
5050
- name: Push to Nuget
51-
run: dotnet nuget push nupkg/*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_KEY}} --skip-duplicate
51+
run: |
52+
gci ./nupkg/*.nupkg |
53+
sort LastWriteTime -Descending |
54+
select -First 1 |
55+
% { dotnet nuget push $_.FullName --source https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_KEY}} --skip-duplicate }

0 commit comments

Comments
 (0)