brandedoutcast / publish-nuget

📦 GitHub action to automate publishing NuGet packages when project version changes
https://github.com/marketplace/actions/publish-nuget
MIT License
197 stars 101 forks source link

[BUG] Unrecognized option '--skip-duplicate' #51

Open TheBeachMaster opened 3 years ago

TheBeachMaster commented 3 years ago

Describe the bug This is somewhat similar to #37 .

Given that #37 was closed with a link to #4864 and commit c12b854

I have still encountered this issue trying to publish to Nuget with the following error

Generated Package(s): AfricasTalking.NET.1.2.1.nupkg
executing: [dotnet nuget push *.nupkg -s https://api.nuget.org/v3/index.json -k *** --skip-duplicate -n 1]
Specify --help for a list of available options and commands.
error: Unrecognized option '--skip-duplicate

Failed Action Log URL (Required) https://github.com/AfricasTalkingLtd/africastalking.Net/actions/runs/342255796

To Reproduce Steps to reproduce the behavior:

  1. In your workflows/steps.yml add the following
    
    name: .NETBuild

on: push: branches: [ master ]

jobs: build:

runs-on: windows-latest
strategy:
  matrix:
    dotnet: [ '2.2.103', '3.0', '3.1.x' ]
name: Build ${{ matrix.dotnet }}
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
  uses: actions/setup-dotnet@v1
  with:
    dotnet-version: ${{ matrix.dotnet }}
- name: Install dependencies
  run: dotnet restore
- name: Build
  run: dotnet build --configuration Release --no-restore
- name: Test
  run: dotnet test --no-restore --verbosity normal
- name: Publish Package
  uses: rohith/publish-nuget@v2
  with:
      PROJECT_FILE_PATH: AfricasTalkingCS/AfricasTalkingCS.csproj  ## Change to something else
      NUGET_KEY: ${{secrets.NUGET_API_KEY}} ## Change to something else
      PACKAGE_NAME: AfricasTalking.NET ## Change to something else


**Expected Behavior**
Successful push to Nuget like [https://github.com/AfricasTalkingLtd/africastalking.Net/actions/runs/184718535](https://github.com/AfricasTalkingLtd/africastalking.Net/actions/runs/184718535)

**Environment:**
 - Platform : CI
 - Action Version [rohith/publish-nuget@v2](https://github.com/brandedoutcast/publish-nuget/blob/108c10b32aa03efa5f71af6a233dc2e8e32845cb/README.md)
TheBeachMaster commented 3 years ago

Update: It somehow worked https://github.com/AfricasTalkingLtd/africastalking.Net/runs/1346457611

Closing ...

silasary commented 3 years ago

I'm still experiencing this: https://github.com/PennyDreadfulMTG/GatherlingClient/runs/1356350991

Generated Package(s): Gatherling.1.0.25.nupkg, Gatherling.1.0.25.snupkg
executing: [dotnet nuget push *.nupkg -s https://api.nuget.org/v3/index.json -k *** --skip-duplicate ]
Specify --help for a list of available options and commands.
error: Unrecognized option '--skip-duplicate'

Error: 😭 error: Unrecognized option '--skip-duplicate'