Skip to content

Comments

Fix NuGet publish workflow for Linux runners#84

Merged
gfs merged 4 commits intomainfrom
copilot/fix-github-actions-workflow
Feb 10, 2026
Merged

Fix NuGet publish workflow for Linux runners#84
gfs merged 4 commits intomainfrom
copilot/fix-github-actions-workflow

Conversation

Copy link
Contributor

Copilot AI commented Feb 10, 2026

Fix GitHub Actions workflow build failure

  • Analyze workflow logs to identify the root cause
  • Identify that nuget.exe cannot run on Linux (ubuntu-latest runner)
  • Replace NuGet/setup-nuget action with dotnet nuget push command
  • Address code review feedback - use env var for API key and add --skip-duplicate
  • Apply reviewer suggestions - fix capitalization and quote API key variable
  • Run final code review - no issues found
  • Run security scan with CodeQL - no issues found
Original prompt

Fix the failing GitHub Actions workflow build
Analyze the workflow logs, identify the root cause of the failure, and implement a fix.
Job ID: 62735210084
Job URL: https://github.com/gfs/StreamRegex/actions/runs/21746995523/job/62735210084


💡 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.

Copilot AI and others added 2 commits February 10, 2026 08:00
Co-authored-by: gfs <98900+gfs@users.noreply.github.com>
Co-authored-by: gfs <98900+gfs@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions workflow build Fix NuGet publish workflow for Linux runners Feb 10, 2026
Copilot AI requested a review from gfs February 10, 2026 08:03
@gfs gfs marked this pull request as ready for review February 10, 2026 22:44
@gfs gfs requested a review from Copilot February 10, 2026 22:44
Copy link

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

Updates the NuGet publishing GitHub Actions workflow to work on ubuntu-latest runners by switching from nuget.exe to the cross-platform dotnet nuget push.

Changes:

  • Remove NuGet/setup-nuget and publish using dotnet nuget push
  • Provide NuGet API key via an environment variable
  • Add --skip-duplicate to make re-publishes idempotent

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

Co-authored-by: gfs <98900+gfs@users.noreply.github.com>
@gfs gfs requested a review from Copilot February 10, 2026 22:53
@gfs gfs merged commit f27f6e5 into main Feb 10, 2026
5 checks passed
@gfs gfs deleted the copilot/fix-github-actions-workflow branch February 10, 2026 22:54
Copy link

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

.github/workflows/publishnuget.yml:36

  • dotnet pack is invoked without --configuration Release (defaults to Debug) and without --no-build, so it will rebuild and may produce/publish a Debug-config NuGet package. Consider using dotnet pack --no-build --configuration Release ... (and rely on the earlier Release build) to ensure the published package matches the intended configuration and to reduce CI time.
    - name: Build
      run: dotnet pack --no-restore StreamRegex.Extensions -o NuPkgs

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

@@ -34,9 +34,7 @@ jobs:
run: dotnet test --no-restore --verbosity normal
Copy link

Copilot AI Feb 10, 2026

Choose a reason for hiding this comment

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

The dotnet test step uses --no-restore but not --no-build or --configuration Release, so it will rebuild (defaulting to Debug) and won’t actually test the Release build produced in the previous step. Consider aligning with .github/workflows/test.yml by using dotnet test --no-build --configuration Release (and keep --verbosity normal if desired) to avoid redundant builds and ensure Release artifacts are validated.

This issue also appears on line 35 of the same file.

Suggested change
run: dotnet test --no-restore --verbosity normal
run: dotnet test --no-build --configuration Release --no-restore --verbosity normal

Copilot uses AI. Check for mistakes.
Copy link
Owner

Choose a reason for hiding this comment

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

@copilot - this branch has already been merged, but implement these proposed changes as a new PR against main - also do a second pass of a code review for additional issues.

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