SetProperty.ps1 is a PowerShell script that, contrary to its name, can get or set any number of properties in the first PropertyGroup element in a .csproj or .props file. The file is only saved if changes were made.
I use this in my github actions workflows to update my project's version number(s) when I push a new tag, feel free to do the same. You have my permission to include this in your projects and version control system with or without crediting me.
SetProperty