Change version retrieval to short commit SHA

Updated the workflow to retrieve the short commit SHA instead of the project version from Git tags.
This commit is contained in:
Enno Gelhaus 2025-10-01 14:40:42 +02:00 committed by GitHub
parent b8c7200215
commit 39c6cba6ff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 5 deletions

View File

@ -51,13 +51,12 @@ jobs:
- name: Build
run: pnpm run build
- name: Get Project Version from Git Tag
- name: Get Commit SHA (short)
id: get_version
run: |
# Use 'git describe' to find the closest tag, falling back to the commit SHA if no tag is found.
# --tags includes all tags, --always ensures it always outputs something.
VERSION=$(git describe --tags --always)
echo "Project version is $VERSION"
# Get the short 8-character commit SHA
VERSION=$(git rev-parse --short=8 HEAD)
echo "Commit SHA is $VERSION"
echo "tag=$VERSION" >> $GITHUB_OUTPUT
- name: SonarQube Analysis (Branch)