diff --git a/.github/workflows/auto-version.yml b/.github/workflows/auto-version.yml index 03eb683..8e31c88 100644 --- a/.github/workflows/auto-version.yml +++ b/.github/workflows/auto-version.yml @@ -76,11 +76,7 @@ jobs: - name: Bump version id: bump_version run: | - LATEST_TAG=$(git tag --sort=-v:refname | grep -E "^v[0-9]+\.[0-9]+\.[0-9]+" | head -n1) - if [ -z "$LATEST_TAG" ]; then - LATEST_TAG="v0.0.0" - echo "No existing version tag found, starting from ${LATEST_TAG}" - fi + LATEST_TAG=${{ steps.get_version_info.outputs.latest_tag }} COMMIT_SHA=${{ steps.get_version_info.outputs.commit_sha }} PREFIX=${{ steps.get_version_info.outputs.prefix }} @@ -91,7 +87,7 @@ jobs: VERSION=${LATEST_TAG#v} IFS='.' read -ra VERSION_PARTS <<< "$VERSION" - echo "current_version=${VERSION}" >> $GITHUB_OUTPUT + echo "current_version=v${VERSION}" >> $GITHUB_OUTPUT # Version increment logic case $BUMP_TYPE in