From 6fcb7b03540674d8b56bf8a26f91cc86a58179ab Mon Sep 17 00:00:00 2001 From: Louis Beaumont Date: Wed, 31 Jul 2024 08:45:38 +0200 Subject: [PATCH] chore: ci updates --- .github/workflows/release-cli.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-cli.yml b/.github/workflows/release-cli.yml index 6e6a8b91..634c2e20 100644 --- a/.github/workflows/release-cli.yml +++ b/.github/workflows/release-cli.yml @@ -60,11 +60,13 @@ jobs: export PKG_CONFIG_ALLOW_CROSS=1 cargo build --release --features metal --target ${{ matrix.target }} + # get the current tag or take latest (in the case of a workflow dispatch) - name: Set version run: | VERSION=${GITHUB_REF#refs/tags/} if [[ $VERSION != v* ]]; then - VERSION=$(git describe --tags --abbrev=0) + git fetch --tags + VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0") fi VERSION=${VERSION#v} echo "VERSION=$VERSION" >> $GITHUB_ENV