Skip to content

L⚠️ ◾ Add GitHub Actions workflow for package updates#794

Merged
neilr81 merged 51 commits intomainfrom
bugfix/add-pu
Mar 4, 2026
Merged

L⚠️ ◾ Add GitHub Actions workflow for package updates#794
neilr81 merged 51 commits intomainfrom
bugfix/add-pu

Conversation

@neilr81
Copy link
Contributor

@neilr81 neilr81 commented Feb 7, 2026

This pull request introduces a new automated workflow for keeping NuGet package versions up to date. It adds a PowerShell script to scan and update package versions in the Directory.Packages.props file and a GitHub Actions workflow to run this script weekly and on pull requests to the main branch. The workflow commits any changes and opens a pull request automatically if updates are found.

Automation for NuGet package updates:

  • Added .github/scripts/Update-NuGetPackageVersions.ps1, a PowerShell script that:
    • Scans Directory.Packages.props for PackageVersion entries in ItemGroups labeled AutoUpdate
    • Checks for the latest available versions using dotnet package search
    • Updates versions, respecting the PreserveMajor attribute and pre-release versions
    • Supports verbose logging and error handling suitable for CI environments

GitHub Actions workflow for scheduled and PR-based updates:

  • Added .github/workflows/package-update.yml to:
    • Run weekly (every Monday at 6:00 UTC)
    • Temporarily for checkout code to test the new workflow, install dependencies, run the update script, and create a new branch/commit if changes are detected
    • Open a pull request automatically with the updates and assign it to the triggering user

Copilot AI review requested due to automatic review settings February 7, 2026 14:08
@github-actions
Copy link
Contributor

github-actions bot commented Feb 7, 2026

PR Metrics

Try to keep pull requests smaller than 400 lines of new product code by following the Single Responsibility Principle (SRP).
⚠️ Consider adding additional tests.

Lines
Product Code 902
Test Code -
Subtotal 902
Ignored Code 72
Total 974

Metrics computed by PR Metrics. Add it to your Azure DevOps and GitHub PRs!

@github-actions github-actions bot changed the title Add GitHub Actions workflow for package updates XS✔ ◾ Add GitHub Actions workflow for package updates Feb 7, 2026
This script updates NuGet package versions in the Directory.Packages.props file by querying the latest available versions and updating the Version attributes accordingly, while respecting the PreserveMajor attribute and pre-release version detection.
@github-actions github-actions bot changed the title XS✔ ◾ Add GitHub Actions workflow for package updates S⚠️ ◾ Add GitHub Actions workflow for package updates Feb 7, 2026
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

Adds a new GitHub Actions workflow intended to run a PowerShell-based update script and automatically open a PR with the resulting changes.

Changes:

  • Introduces .github/workflows/package-update.yml with a workflow_dispatch + push trigger.
  • Runs a PowerShell script, commits any changes to a new branch, pushes it, and opens a PR via gh.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 7, 2026 14:12
Changed the trigger for package updates to a scheduled cron job.
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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

Copy link
Contributor

Copilot AI commented Feb 7, 2026

@neilr81 I've opened a new pull request, #796, to work on those changes. Once the pull request is ready, I'll request review from you.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 7, 2026 14:24
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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

Copilot AI and others added 2 commits February 7, 2026 14:28
* Initial plan

* Gate PR creation on changes detection flag

Co-authored-by: neilr81 <49037171+neilr81@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: neilr81 <49037171+neilr81@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 7, 2026 14:37
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

Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 7, 2026 19:29
neilr81 and others added 2 commits February 7, 2026 19:30
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Contributor

Copilot AI commented Mar 2, 2026

@neilr81 I've opened a new pull request, #832, to work on those changes. Once the pull request is ready, I'll request review from you.

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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 2, 2026 16:22
neilr81 and others added 2 commits March 2, 2026 16:23
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings March 2, 2026 16:43
@neilr81 neilr81 marked this pull request as ready for review March 2, 2026 16:43
@neilr81 neilr81 requested a review from a team as a code owner March 2, 2026 16:43
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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Copy link
Contributor

Copilot AI commented Mar 2, 2026

@neilr81 I've opened a new pull request, #833, to work on those changes. Once the pull request is ready, I'll request review from you.

…in dotnet args (#833)

* Initial plan

* Fix Get-LatestPackageVersion to correctly use prerelease and configfile args

Co-authored-by: neilr81 <49037171+neilr81@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: neilr81 <49037171+neilr81@users.noreply.github.com>
Introduce an optional NugetConfigPath parameter to Update-NuGetPackageVersions.ps1 and Update-DotNetSdkVersions.ps1 so the scripts can use a configurable NuGet config file (default: NuGet.Config). Update verbose messages and warnings to reference the chosen config path and simplify config selection logic to prefer the provided config name. Update the package-update GitHub Actions workflow to pass NuGet-GitHub.Config to both scripts and switch actions/setup-dotnet to use the repository global.json (global-json-file) instead of a hardcoded dotnet-version.
Copilot AI review requested due to automatic review settings March 3, 2026 16:22
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

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

@neilr81 neilr81 merged commit 4d36e5a into main Mar 4, 2026
11 checks passed
@neilr81 neilr81 deleted the bugfix/add-pu branch March 4, 2026 15:27
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.

4 participants