Let's say I want two workflows build.yml and release.yml in my repo. The first one should build the project (let's say using CMake) and the second one should build the project and create a GitHub Release with the built binary.
The project building code is duplicated between the two files. How could it be shared between them, instead of being copy-pasted and having to be manually updated in two places at once?
I have not been able to find a way to achieve any kind of code sharing behavior yet between separate workflows or even jobs within the same workflow.