aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci.yml9
1 files changed, 8 insertions, 1 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b69d34e7..946b3073 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -65,7 +65,14 @@ jobs:
echo "CC=clang" >>$GITHUB_ENV
echo "CXX=clang++" >>$GITHUB_ENV
fi
- echo "QUOTEST_ORIGIN=${{ github.ref }} @ ${{ runner.os }}/${{ matrix.compiler }}" >>$GITHUB_ENV
+ if grep -q 'refs/tags' <<<'${{ github.ref }}'; then
+ VERSION="$(git describe --tags)"
+ elif [ '${{ github.ref }}' == 'refs/heads/master' ]; then
+ VERSION="ci${{ github.run_number }}-$(git rev-parse --short HEAD)"
+ else
+ VERSION="$(git describe --all --contains)-ci${{ github.run_number }}-$(git rev-parse --short HEAD)"
+ fi
+ echo "QUOTEST_ORIGIN=$VERSION @ ${{ runner.os }}/${{ matrix.compiler }}" >>$GITHUB_ENV
echo "CMAKE_ARGS=-G Ninja -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_SHARED_LIBS=false \
-DCMAKE_INSTALL_PREFIX=~/.local -DCMAKE_PREFIX_PATH=~/.local" >>$GITHUB_ENV
cmake -E make_directory ${{ runner.workspace }}/build