diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 8923e5e..e6dc42a 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,2 +1,2 @@ [bumpversion] -current_version = 2.23.0 \ No newline at end of file +current_version = 2.23.0 diff --git a/.github/workflows/helm-publish.yaml b/.github/workflows/helm-publish.yaml index 7bc04e4..d273d28 100644 --- a/.github/workflows/helm-publish.yaml +++ b/.github/workflows/helm-publish.yaml @@ -15,11 +15,10 @@ jobs: - name: Get current version from bumpversion id: get-version run: | - version=$(cat .bumpversion.cfg | sed -nE 's/.*current_version = (.*)/\1/p') - if [[ "${GITHUB_REF#refs/heads/}" != "main" && "${GITHUB_REF#refs/heads/}" != "master" ]]; then + version=$(sed -nE 's/.*current_version = (.*)/\1/p' < .bumpversion.cfg) + if ! [[ "$GITHUB_REF" =~ ^refs/tags/.* ]]; then version="${version}-SNAPSHOT" fi - echo $version echo "version=$version" >> $GITHUB_OUTPUT shell: bash