Skip to content

Fix missing package path in dotnet nuget push#9

Merged
jhgbrt merged 2 commits into
masterfrom
copilot/fix-nuget-push-command-argument
Mar 7, 2026
Merged

Fix missing package path in dotnet nuget push#9
jhgbrt merged 2 commits into
masterfrom
copilot/fix-nuget-push-command-argument

Conversation

Copilot AI commented Mar 7, 2026

Copy link
Copy Markdown
Contributor

dotnet nuget push was invoked without a package path, causing the publish workflow to fail with "Required argument missing for command: 'push'". The package filename includes a dynamic version, so it can't be hardcoded.

Changes

  • build-and-publish.yml
    • dotnet pack: added --configuration Release --output ./artifacts to emit the .nupkg to a known directory
    • dotnet nuget push: added ./artifacts/*.nupkg as the package argument (handles dynamic version in filename) and explicit --source https://api.nuget.org/v3/index.json
- name: Package
  run: dotnet pack --no-build --configuration Release --output ./artifacts
- name: Publish NuGet
  run: dotnet nuget push ./artifacts/*.nupkg --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json
Original prompt

This section details on the original issue you should resolve

<issue_title>build and publish: missing argument for command 'push'</issue_title>
<issue_description>The workflow builds and packs the nuget package, but the push command doesn't specifiy the package.
Package is in bin/release/Net.Code.Csv.[version].nupkg
Problem is this contains the version which is dynamic.

Run dotnet nuget push --api-key ***
Required argument missing for command: 'push'.

error: Please specify the path to the package.
Error: Process completed with exit code 1.
</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: jhgbrt <126034+jhgbrt@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix missing argument for nuget push command Fix missing package path in dotnet nuget push Mar 7, 2026
@jhgbrt jhgbrt marked this pull request as ready for review March 7, 2026 09:42
@jhgbrt jhgbrt merged commit 196efd5 into master Mar 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

build and publish: missing argument for command 'push'

2 participants