Set correct git tag in Github Actions builds #3143
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I noticed that the Gzdoom builds produced by Github Actions have their version set to
<unknown version>, visible in the console and logs. This PR fixes that.The issue is because the
git describe --tagscommand, used by UpdateRevision.cmake, can't be used on shallow checkouts of the git repository as Github Actions does for efficiency. This could be fixed by forcing a full git checkout, but that would make the workflow take longer to run, so instead I use the gh-describe action which was built for handling this case and gives the same output as the git command.(This might seem like an unnecessary fix if the Github Actions here happen to be intended just to test that the build works, but in my own toy fork of Gzdoom, I'm interested in getting Github Actions to produce the release builds for users for all systems.)