Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 13, 2025

The find command in the publish workflow silently succeeds when no packages exist, masking artifact download failures or incorrect run IDs.

Changes

Added validation to both package listing steps:

  • Check packages/ directory exists before scanning
  • Verify at least one .nupkg file is present
  • Fail fast with descriptive error messages on stderr
- name: List packages to publish
  run: |
    echo "Packages to publish:"
    if [ ! -d "packages" ]; then
      echo "ERROR: packages directory does not exist. Artifact download may have failed." >&2
      exit 1
    fi
    PACKAGES=$(find packages -name "*.nupkg" -type f)
    if [ -z "$PACKAGES" ]; then
      echo "ERROR: No .nupkg files found in packages directory. Check that artifacts were downloaded correctly." >&2
      exit 1
    fi
    echo "$PACKAGES" | while read f; do echo "  - $(basename $f)"; done

Applied identical validation to the dry run summary step.


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

Copilot AI changed the title [WIP] Update CI steps and publish workflow for NLog.Extensions.AzureStorage Add error handling for missing packages in publish workflow Dec 13, 2025
Copilot AI requested a review from JDetmar December 13, 2025 05:40
@JDetmar JDetmar marked this pull request as ready for review December 13, 2025 05:46
Copilot AI review requested due to automatic review settings December 13, 2025 05:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enhances error handling in the publish workflow to prevent silent failures when package artifacts are missing or download failures occur.

Key Changes:

  • Added validation to verify the packages/ directory exists before scanning
  • Added validation to ensure at least one .nupkg file is present
  • Implemented fail-fast behavior with descriptive error messages written to stderr

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@JDetmar JDetmar merged commit fe95d2b into ci-publish-workflow Dec 13, 2025
6 of 9 checks passed
@JDetmar JDetmar deleted the copilot/sub-pr-185 branch December 13, 2025 05:50
JDetmar added a commit that referenced this pull request Dec 13, 2025
#185)

* Add CI steps for restoring projects and create publish workflow for NuGet

* Update .github/workflows/publish.yml

Co-authored-by: Copilot <[email protected]>

* Update .github/workflows/publish.yml

Co-authored-by: Copilot <[email protected]>

* Update .github/workflows/publish.yml

Co-authored-by: Copilot <[email protected]>

* Update .github/workflows/ci.yml

Co-authored-by: Copilot <[email protected]>

* Update .github/workflows/ci.yml

Co-authored-by: Copilot <[email protected]>

* Add error handling for missing packages in publish workflow (#186)

* Initial plan

* Add error handling for package discovery in publish workflow

Co-authored-by: JDetmar <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: JDetmar <[email protected]>

* Fix invalid matrix strategy placement in publish workflow (#187)

* Initial plan

* Fix publish.yml syntax error - move strategy matrix to proper structure

Co-authored-by: JDetmar <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: JDetmar <[email protected]>

* Add restore step for matrix projects in CI workflow

---------

Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
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.

2 participants