From d164c65b06a997372c9282afd6bf505b1c69b4f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yannick=20R=C3=B6der?= Date: Mon, 8 Jul 2024 13:25:18 +0200 Subject: [PATCH] Fix snapshot versioning --- .github/workflows/helm-publish.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/helm-publish.yaml b/.github/workflows/helm-publish.yaml index 1fdf6e8..e2b3a2a 100644 --- a/.github/workflows/helm-publish.yaml +++ b/.github/workflows/helm-publish.yaml @@ -21,11 +21,11 @@ jobs: - name: Get current version from bumpversion id: get-version run: | - if ! [[ "$GITHUB_REF" =~ ^refs/tags/.* ]]; then + if [[ "$GITHUB_REF" =~ ^refs/tags/.* ]]; then + version="$(sed -nE 's/.*current_version = (.*)/\1/p' < .bumpversion.cfg)" + else bump2version --allow-dirty --no-tag --no-commit patch version="$(sed -nE 's/.*current_version = (.*)/\1/p' < .bumpversion.cfg)-SNAPSHOT" - else - version="$(sed -nE 's/.*current_version = (.*)/\1/p' < .bumpversion.cfg)" fi echo "version=$version" >> $GITHUB_OUTPUT shell: bash