Automatic NuGet Package Updates with GitHub Actions

Finding a way to merge NuGet package updates in your .NET projects on GitHub to your main branch without having to review a Pull Request.

Stephen Walsh
5 min readNov 27, 2021

--

Photo from Joshua Reddekopp on Unsplash

It’s a tale as old as time, as a software engineer, you write some code, you’re happy with it and then you deliver it. End of story, right? No more work to be done! As usual there’s many more layers to deal with and one of those many layers is maintenance……boooooo!!!!!

I know this isn’t the most amazing topic to write about, but it solves a real-world problem for me and I’m hoping for some of you too.

I’m a backend engineer and write a lot of C#, which means I end up with solutions relying on NuGet packages. These do need to be updated all the time because there are other engineers out there doing amazing work keeping their packages up to date and I like to keep my dependencies up to date. This is where I find myself, with the problem of having to create a branch, update the packages, commit it, then seek PR approval, just to get some minor updates through. It’s annoying and I want to solve this.

Before we get underway, are these instructions for me?

  1. You have a solution written in .NET…these instructions only work for code in .NET.

--

--

Stephen Walsh
Stephen Walsh

Written by Stephen Walsh

Hello! I’m a Husband, Father, Software Engineer, Learner & Leader. I live in Wisconsin, and spend my days trying to balance all of the above.