Skip to content

Commit 4bcff63

Browse files
committed
ci: extract Maven version from pom.xml to use in GitHub Actions release step
1 parent bcbda97 commit 4bcff63

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/maven_publish.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,14 @@ jobs:
2121
java-version: '21'
2222
distribution: 'temurin'
2323

24+
- name: Extract version from pom.xml
25+
id: get_version
26+
run: |
27+
VERSION=$(grep -m1 '<version>' pom.xml | sed -E 's/.*<version>([^<]+)<\/version>.*/\1/')
28+
echo "version=$VERSION" >> $GITHUB_OUTPUT
29+
2430
- name: Run Maven Release
25-
run: mvn clean install && mvn semantic-version:release
31+
run: mvn clean install && mvn io.github.zorin95670:semantic-version:${{ steps.get_version.outputs.version }}:release
2632

2733
- name: Push commit and tags
2834
run: |

0 commit comments

Comments
 (0)