diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 6309d98b..7bcb1d12 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -8,6 +8,8 @@ jobs: build: runs-on: ${{ matrix.os }} + env: + BUILD_NUMBER: ${{ github.GITHUB_RUN_NUMBER }} strategy: matrix: os: diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 2010e6b2..f3cfa4da 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -8,6 +8,8 @@ jobs: build: runs-on: ${{ matrix.os }} + env: + BUILD_NUMBER: ${{ github.GITHUB_RUN_NUMBER }} strategy: matrix: os: diff --git a/git.cmake b/git.cmake index 61f376ee..bd726f45 100644 --- a/git.cmake +++ b/git.cmake @@ -32,7 +32,7 @@ endif() # lookup most recent tag to derive version execute_process( - COMMAND git describe HEAD + COMMAND git describe --tags HEAD WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_VARIABLE GIT_INFO OUTPUT_STRIP_TRAILING_WHITESPACE