From 67174c5948256fa26fb82b44277e870466f7c8d2 Mon Sep 17 00:00:00 2001 From: davidvanleeuwen Date: Mon, 26 Feb 2024 15:07:53 +0100 Subject: [PATCH] Fix indention --- .github/workflows/release_server.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/release_server.yml b/.github/workflows/release_server.yml index 32c0be8..84063e4 100644 --- a/.github/workflows/release_server.yml +++ b/.github/workflows/release_server.yml @@ -37,19 +37,19 @@ jobs: run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* - name: Determine new version tag - id: versioning - run: | - LATEST_TAG="server-v0.1.8" - if [[ "$LATEST_TAG" == "" ]]; then - NEW_TAG="server-v0.1.0" - else - VERSION_NUM=$(echo "$LATEST_TAG" | sed 's/server-v//') - IFS='.' read -r MAJOR MINOR PATCH <<< "$VERSION_NUM" - ((PATCH++)) - NEW_TAG="server-v${MAJOR}.${MINOR}.${PATCH}" - fi - echo "New tag: $NEW_TAG" - echo "NEW_TAG=$NEW_TAG" >> $GITHUB_ENV + id: versioning + run: | + LATEST_TAG=$(git tag -l "server-v*" --sort=-v:refname | head -n 1) + if [[ "$LATEST_TAG" == "" ]]; then + NEW_TAG="server-v0.1.0" + else + VERSION_NUM=$(echo "$LATEST_TAG" | sed 's/server-v//') + IFS='.' read -r MAJOR MINOR PATCH <<< "$VERSION_NUM" + ((PATCH++)) + NEW_TAG="server-v${MAJOR}.${MINOR}.${PATCH}" + fi + echo "New tag: $NEW_TAG" + echo "NEW_TAG=$NEW_TAG" >> $GITHUB_ENV - name: 🎙 Discord notification 2/3 env: