From f7ebdf8ac79c5e674e97c101ad5f21050dc01670 Mon Sep 17 00:00:00 2001 From: Dissectum <124477333+Dissectum@users.noreply.github.com> Date: Thu, 14 Sep 2023 18:46:31 +0800 Subject: [PATCH] Update ci.yml --- .github/workflows/ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9c17d6e..a1c4011 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,22 +31,21 @@ jobs: fetch-depth: 0 - id: meta run: | - echo 0 is_release=${{ startsWith(github.ref, 'refs/tags/v') }} tag=$(git describe --tags --match "v*" ${{ github.ref }} || true) if [[ $tag != v* ]]; then tag=$(date "+v0.0.0-%y%m%d-$(git rev-parse --short HEAD)") fi - echo 1 if ! $($is_release) ; then prefix=${tag%-*-*} suffix=${tag#$prefix-} next=${prefix##*.} + echo 0 ((next++)) + echo 1 prefix=${prefix%.*} tag="$prefix.$next-Preview.$suffix" fi - echo 2 echo tag=$tag | tee -a $GITHUB_OUTPUT echo version=${tag#v} | tee -a $GITHUB_OUTPUT echo is_release=$is_release | tee -a $GITHUB_OUTPUT