From b319e113e50fd1fa43827b271cff2b0b2686d004 Mon Sep 17 00:00:00 2001 From: Ilya Voronin Date: Mon, 21 Nov 2022 15:28:59 +0500 Subject: [PATCH] Fixed version detection --- .github/workflows/main.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bacade6..69b2bdf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,7 +26,12 @@ jobs: with: fetch-depth: 0 - - name: Set version + - name: Set version for tag + if: github.ref_type == 'tag' + run: echo "version=$(git describe --tags --match 'v*')" >> $GITHUB_ENV + + - name: Set version for branch + if: github.ref_type == 'branch' run: echo "version=$(git describe --tags)" >> $GITHUB_ENV - name: Build