From 2d7b0296f67fab46de3ba4e5ae9a240a87d2ce2f Mon Sep 17 00:00:00 2001 From: Sandy Date: Fri, 2 Dec 2022 18:46:47 -0500 Subject: [PATCH] Use commit count for tag In the case where the cmake package has been updated but bgfx submodules haven't it is more informative to have the commit count than the sha. --- .github/workflows/release.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ac1092d..9a9dc2a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,11 +25,11 @@ jobs: - id: version run: | API_VERSION=$(grep -Eo "BGFX_API_VERSION UINT32_C\([0-9]+\)" bgfx/include/bgfx/defines.h | grep -Eo "[0-9]+" | tail -1) - REVISION=$(cd bgfx && git rev-list HEAD --count) + BGFX_REVISION=$(cd bgfx && git rev-list HEAD --count) + BGFX_CMAKE_REVISION=$(git rev-list HEAD --count) SHA=$(cd bgfx && git rev-parse HEAD) - SHA7="${GITHUB_SHA::7}" - TAG="v1.${API_VERSION}.${REVISION}-${SHA7}" - echo "::set-output name=revision::${REVISION}" + TAG="v1.${API_VERSION}.${BGFX_REVISION}-${BGFX_CMAKE_REVISION}" + echo "::set-output name=revision::${BGFX_REVISION}" echo "::set-output name=sha::${SHA}" echo "::set-output name=tag::${TAG}"