'Github Actions for multi projects for same solution

How does one go about triggering different workflows based on which branches the code changes are from?

i.e. consider the following:

MyCoolPackages.sln
  |__ PackageOne.csproj
  |__ PackageTwo.csproj

So my current workflow is set to build PackageOne every time there is a PR for main/develop branches. But lets say I've added a new feature to PackageTwo and only want that project to build and release. Can find examples for this type of GA. What are the approaches here? Have a generic workflow and pass in the solution name? But how to go about doing that based on code changes?



Solution 1:[1]

I managed to strap together a solution here => https://github.com/Syed-RI/the_bruno_project

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 envyM6