Skip to content

Commit 8e2b6dc

Browse files
committed
ci: better uploading to release
Signed-off-by: Anatoly Popov <[email protected]>
1 parent 634e847 commit 8e2b6dc

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,12 @@ jobs:
3838
dotnet pack -c Release --no-build -v minimal -o ${{ env.NuGetDirectory }} -p:PackageVersion=$NugetVersion
3939
- name: Publish NuGet package
4040
if: success() && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository)
41-
run: dotnet nuget push "${{ env.NuGetDirectory }}\*.nupkg" --api-key "${{ secrets.NUGET_PUSH }}" --source https://api.nuget.org/v3/index.json
41+
run: dotnet nuget push "${{ env.NuGetDirectory }}\*.nupkg" --api-key "${{ secrets.NUGET_PUSH }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
4242
- name: Upload files to a GitHub release
43-
if: success() && github.ref_type == 'tag'&& (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository)
44-
uses: svenstaro/upload-[email protected]
43+
if: success() && github.ref_type == 'tag' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository)
44+
uses: xresloader/upload-[email protected]
4545
with:
46-
file: ${{ env.NuGetDirectory }}\*.nupkg
47-
file_glob: true
46+
file: ${{ env.NuGetDirectory }}\\*.nupkg
47+
tags: true
48+
overwrite: true
49+
tag_name: ${{ github.ref_name }}

0 commit comments

Comments
 (0)