Skip to content

Fix build workflow publishing empty.nupkg from EmptyFiles test package#428

Merged
ejsmith merged 4 commits into
mainfrom
copilot/fix-empty-nupkg-publishing
Dec 10, 2025
Merged

Fix build workflow publishing empty.nupkg from EmptyFiles test package#428
ejsmith merged 4 commits into
mainfrom
copilot/fix-empty-nupkg-publishing

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 10, 2025

The build workflow was attempting to publish empty.nupkg created by the EmptyFiles test helper package, causing conflicts at https://nuget.pkg.github.com/foundatiofx and https://f.feedz.io/foundatio/foundatio/nuget.

Changes

  • Added filter to exclude paths containing /EmptyFiles/ directory
  • Applied to both CI and release publishing steps
  • Made find command explicit by specifying search path

Before:

find -name "*.nupkg" | grep "minver" -v

After:

find . -name "*.nupkg" | grep -v "minver" | grep -v "/EmptyFiles/"

This approach excludes test helper files in tests/**/bin/**/EmptyFiles/ while working with any build directory structure, not assuming packages are only in a specific location.

Original prompt

The shared build is trying to publish empty.nupkg. Fix it.

Run for package in $(find -name "*.nupkg" | grep "minver" -v); do
9b6b3f62-2b15-470b-ae8e-3ab977e2b7ef.sh: Pushing ./tests/Foundatio.Mediator.Tests/bin/Release/net10.0/EmptyFiles/archive/empty.nupkg to GitHub...
Pushing empty.nupkg to 'https://nuget.pkg.github.com/foundatiofx'...
PUT https://nuget.pkg.github.com/foundatiofx/
warn : Error: Version 1.0.0 of "empty" has already been pushed.
Conflict https://nuget.pkg.github.com/foundatiofx/ 108ms
Package '/home/runner/work/Foundatio.Mediator/Foundatio.Mediator/./tests/Foundatio.Mediator.Tests/bin/Release/net10.0/EmptyFiles/archive/empty.nupkg' already exists at feed 'https://nuget.pkg.github.com/foundatiofx'.
9b6b3f62-2b15-470b-ae8e-3ab977e2b7ef.sh: Pushing ./tests/Foundatio.Mediator.Tests/bin/Release/net10.0/EmptyFiles/archive/empty.nupkg to Feedz...
Pushing empty.nupkg to 'https://f.feedz.io/foundatio/foundatio/nuget'...
PUT https://f.feedz.io/foundatio/foundatio/nuget/
Conflict https://f.feedz.io/foundatio/foundatio/nuget/ 894ms
Package '/home/runner/work/Foundatio.Mediator/Foundatio.Mediator/./tests/Foundatio.Mediator.Tests/bin/Release/net10.0/EmptyFiles/archive/empty.nupkg' already exists at feed 'https://f.feedz.io/foundatio/foundatio/nuget'.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

…acts directory

Co-authored-by: ejsmith <282584+ejsmith@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix shared build publishing empty.nupkg issue Fix build workflow publishing empty.nupkg from EmptyFiles test package Dec 10, 2025
Copilot AI requested a review from ejsmith December 10, 2025 18:23
Comment thread .github/workflows/build-workflow.yml Outdated
if: github.event_name != 'pull_request' && github.actor != 'dependabot[bot]'
run: |
for package in $(find -name "*.nupkg" | grep "minver" -v); do
for package in $(find artifacts -name "*.nupkg" 2>/dev/null | grep -v "minver"); do
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot I don't like this fix because it is assuming that builds always go to the artifacts folder.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right. I've updated the fix to exclude paths containing /EmptyFiles/ instead of limiting to the artifacts directory. This works regardless of where packages are built. Changes in e3c7182.

Copilot AI and others added 2 commits December 10, 2025 18:32
Co-authored-by: ejsmith <282584+ejsmith@users.noreply.github.com>
Co-authored-by: ejsmith <282584+ejsmith@users.noreply.github.com>
Copilot AI requested a review from ejsmith December 10, 2025 18:36
@ejsmith ejsmith marked this pull request as ready for review December 10, 2025 18:39
@ejsmith ejsmith merged commit 31948d8 into main Dec 10, 2025
1 of 2 checks passed
@ejsmith ejsmith deleted the copilot/fix-empty-nupkg-publishing branch December 10, 2025 18:39
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.

3 participants