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