Create custom file into the repository during dotnet build

15 Views Asked by At

I'd like to run custom commands during the build process of a project, to create a json output from a c# static class (.net 8). The class contains permission values and other attributes built into the app so we can use them via intellisense.

But there's an other software that needs to know about these permissions so we keep a json file in sync manually that is pushed into the other app by a github action. It would be more convenient and failsafe to let dotnet build generate the json file, and let the github action push the automatically actualized file to the other app.

Is there any way for this with dotnet build?

0

There are 0 best solutions below