Skip to content

Add --skip-duplicate on Nuget-Push #2

Add --skip-duplicate on Nuget-Push

Add --skip-duplicate on Nuget-Push #2

Workflow file for this run

name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 7.0.x
- name: Restore local tools
run: dotnet tool restore
- name: Build
run: dotnet cake
- name: Publish NuGet package
run: |
REPO_OWNER=$(echo $GITHUB_REPOSITORY | cut -d '/' -f 1)
PACKAGE_PATH=$(find ./artifacts -name '*.nupkg' -print -quit)
dotnet nuget push "$PACKAGE_PATH" --source "https://nuget.pkg.github.com/$REPO_OWNER/index.json" --api-key "${{ secrets.GITHUB_TOKEN }}" --skip-duplicate