question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Publish to NuGet error: Please specify the path to the package.

See original GitHub issue

Description: Unable to publish NuGet package using the command line.

image

Task version: 3.0.1

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Repro steps:
Workflow file: https://github.com/miroiu/nodify/actions/runs/3192383906/workflow

name: Publish package

on:
  push:
    tags:
      - 'v*.*.*'

jobs:
  publish:
    runs-on: windows-latest

    steps:
    - uses: actions/checkout@v2
    - name: Setup .NET Core
      uses: actions/setup-dotnet@v3.0.1
      with:
        dotnet-version: '6.0.x'
    - name: Install dependencies
      run: dotnet restore
    - name: Build
      run: dotnet build --configuration Release --no-restore
    - name: Publish the package
      run: dotnet nuget push -s https://api.nuget.org/v3/index.json -k $NUGET_AUTH_TOKEN */bin/Release/*.nupkg
      env:
        NUGET_AUTH_TOKEN: ${{ secrets.NUGET_KEY }}
      

Expected behavior: NuGet package is published.

Actual behavior: Action fails with error saying that it cannot find the path to the package.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
miroiucommented, Oct 7, 2022

Hi @IvanZosimov ! It’s working fine with this change. Thank you very much!

1reaction
IvanZosimovcommented, Oct 7, 2022

Hi, @miroiu 👋 Try not to push your secret APY key into the environment variable, but instead use the secret inside the dotnet nuget push command like that:

   - name: Publish the package 
      run: dotnet nuget push "*/bin/Release/*.nupkg" -k ${{ secrets.NUGET_KEY }} -s https://api.nuget.org/v3/index.json  

I’m going to close this issue now, if you have any additional questions feel free to ping us.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to push nuget package in GitHub actions - Stack Overflow
config file) fails randomly! Example: - name: Publish Nuget to GitHub registry run: dotnet nuget push ./<project>/out/*.nupkg - ...
Read more >
How to publish NuGet packages | Microsoft Learn
See detailed instructions about how to publish a NuGet package and manage package ownership on nuget.org.
Read more >
NuGet packages in the Package Registry - GitLab Docs
Set a project-level endpoint. Publish a package by running this command: dotnet nuget push <package_file> --source <source_name>.
Read more >
Using Azure Pipelines to publish the NuGet package from ...
I have developed a simple NuGet package that integrates Azure DevOps to build and ... When you specify the path to project(s), you...
Read more >
Unable to push nuget packages to DevOps feed for artifacts
Here is the publish packages template presented in our connect to feed dialog: ... code does not indicate success: 500 (Internal Server Error...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found