From 94a3b419e0322d68fe84f26f16625b80f158617d Mon Sep 17 00:00:00 2001 From: RatzzFatzz Date: Tue, 16 Dec 2025 16:57:38 +0100 Subject: [PATCH] Get release version from tag --- .github/workflows/release.yml | 21 ++++++++++++++++++--- pom.xml | 3 ++- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 32ae9c4..a0060ba 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,6 +21,11 @@ jobs: with: ref: ${{ github.event.release.tag_name }} + - name: Extract version from tag + id: get_version + run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT + shell: bash + - name: Set timezone uses: szenius/set-timezone@v2.0 with: @@ -37,7 +42,7 @@ jobs: - name: Build with Maven run: | - mvn clean package --file pom.xml -P portable + mvn clean package --file pom.xml -P portable -Drevision=${{ steps.get_version.outputs.VERSION }} cp target/M*.{zip,tar} artifacts/ - name: Upload artifacts @@ -62,6 +67,11 @@ jobs: with: ref: ${{ github.event.release.tag_name }} + - name: Extract version from tag + id: get_version + run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT + shell: bash + - name: Set timezone uses: szenius/set-timezone@v2.0 with: @@ -78,7 +88,7 @@ jobs: - name: Build with Maven run: | - mvn clean package --file pom.xml -P linux + mvn clean package --file pom.xml -P linux -Drevision=${{ steps.get_version.outputs.VERSION }} cp target/M*.deb artifacts/ - name: Upload artifacts @@ -105,6 +115,11 @@ jobs: with: ref: ${{ github.event.release.tag_name }} + - name: Extract version from tag + id: get_version + run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT + shell: bash + - name: Set timezone uses: szenius/set-timezone@v2.0 with: @@ -120,7 +135,7 @@ jobs: run: mkdir artifacts - name: Build with Maven - run: mvn clean package --file pom.xml -P windows + run: mvn clean package --file pom.xml -P windows -Drevision=${{ steps.get_version.outputs.VERSION }} - name: Upload artifacts uses: AButler/upload-release-assets@v3.0 diff --git a/pom.xml b/pom.xml index f54e9b9..9e6fdd5 100644 --- a/pom.xml +++ b/pom.xml @@ -6,9 +6,10 @@ at.pcgamingfreaks MKVAudioSubtitleChanger - 4.0.4 + ${revision} + 1.0.0-SNAPSHOT at.pcgamingfreaks.mkvaudiosubtitlechanger.Main UTF-8