Get release version from tag

This commit is contained in:
RatzzFatzz
2025-12-16 16:57:38 +01:00
parent f88fcd0bd5
commit 94a3b419e0
2 changed files with 20 additions and 4 deletions

View File

@@ -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

View File

@@ -6,9 +6,10 @@
<groupId>at.pcgamingfreaks</groupId>
<artifactId>MKVAudioSubtitleChanger</artifactId>
<version>4.0.4</version>
<version>${revision}</version>
<properties>
<revision>1.0.0-SNAPSHOT</revision>
<mainClass>at.pcgamingfreaks.mkvaudiosubtitlechanger.Main</mainClass>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>