From 3598a41284965a96b5e1cbdebe1c8394b28d8d97 Mon Sep 17 00:00:00 2001 From: DARKZOUL5 Date: Wed, 18 Mar 2026 17:27:13 +0200 Subject: [PATCH] Simplify version extraction logic in build workflow by removing conditional checks for event types --- .github/workflows/build.yml | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d51663f..a81e9b8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,13 +25,7 @@ jobs: id: version shell: bash run: | - if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then - VERSION="${{ inputs.tag }}" - elif [ "${{ github.event_name }}" = "release" ]; then - VERSION="${{ github.event.release.tag_name }}" - else - VERSION="${{ github.ref_name }}" - fi + VERSION="${{ inputs.tag }}" VERSION="${VERSION#v}" echo "version=$VERSION" >> $GITHUB_OUTPUT @@ -84,13 +78,7 @@ jobs: id: version shell: bash run: | - if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then - VERSION="${{ inputs.tag }}" - elif [ "${{ github.event_name }}" = "release" ]; then - VERSION="${{ github.event.release.tag_name }}" - else - VERSION="${{ github.ref_name }}" - fi + VERSION="${{ inputs.tag }}" VERSION="${VERSION#v}" echo "version=$VERSION" >> $GITHUB_OUTPUT @@ -187,13 +175,7 @@ jobs: id: version shell: bash run: | - if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then - VERSION="${{ inputs.tag }}" - elif [ "${{ github.event_name }}" = "release" ]; then - VERSION="${{ github.event.release.tag_name }}" - else - VERSION="${{ github.ref_name }}" - fi + VERSION="${{ inputs.tag }}" VERSION="${VERSION#v}" echo "version=$VERSION" >> $GITHUB_OUTPUT