lukka / run-cmake

GitHub Action to build C++ applications with CMake (CMakePresets.json), Ninja and vcpkg on GitHub.
MIT License
171 stars 19 forks source link

Extract project version #104

Open LecrisUT opened 1 year ago

LecrisUT commented 1 year ago

Would be useful to automatically extract and store the project version to a variable. This should be done via FileApi to ensure that it is set even if it is dynamically defined outside project().

Usage I think it is obvious in that it is for uploading tags and github releases.

lukka commented 1 year ago

@LecrisUT thanks for the suggestion! Are you willing to create a PR for adding the feature? Some thoughts:

LecrisUT commented 1 year ago

Fileapi here refers to cmake-file-api. It basically imvolves running cmake configuration with a specific json file. That's why it would make sense to have it here, to consolidate the multiple cmake configuration runs into 1.

Unfortunately I don't have experience in writing github actions and I couldn't deduce my way out of the current implementation, so probably I can't make a PR for this.