From f14d4c0dc2e2a5ba0a8079aa832ec6055aeb6858 Mon Sep 17 00:00:00 2001 From: delyc Date: Mon, 26 Aug 2024 16:10:39 +0200 Subject: [PATCH] feat: new version --- .github/workflows/build-push-fe-docker-hub.yaml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-push-fe-docker-hub.yaml b/.github/workflows/build-push-fe-docker-hub.yaml index 9590dde45..82fdf2240 100644 --- a/.github/workflows/build-push-fe-docker-hub.yaml +++ b/.github/workflows/build-push-fe-docker-hub.yaml @@ -54,9 +54,16 @@ jobs: - name: Determine next version id: determine_version run: | - # Get the latest tag - LATEST_TAG=$(git describe --tags --abbrev=0) - # Calculate next version + # Check if any tags exist + if git tag -l | grep -q '^v'; then + # Get the latest tag + LATEST_TAG=$(git describe --tags --abbrev=0) + else + # If no tags, set the initial tag + LATEST_TAG='v0.0.0' + fi + + # Run semantic-release to get the next version NEXT_VERSION=$(npx semantic-release --dry-run | grep 'Next version' | awk '{print $NF}') echo "NEXT_VERSION=${NEXT_VERSION}" >> $GITHUB_ENV