From 40b0caf448723cd799975f3694bbcb65b1537ea4 Mon Sep 17 00:00:00 2001 From: Jonas Stahl Date: Fri, 4 Oct 2024 01:44:14 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20Test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docker.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index dabcef12..4d433ce6 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -49,6 +49,15 @@ jobs: distribution: 'temurin' cache: maven + - name: Set maven version + run: | + TAG_VERSION=${{ github.ref }} # e.g., refs/tags/v1.2.3 + VERSION=${TAG_VERSION#refs/tags/} # Strip the prefix to get v1.2.3 + VERSION=${VERSION#v} # Strip the 'v' to get 1.2.3 + echo "Version: ${{version}}" + mvn versions:set -DnewVersion=$VERSION + mvn versions:commit # Commit the new version + - name: Build with Maven run: mvn package