From 7701ccbfb9b5cfcc2ddfaefdc48f08bb286e731a Mon Sep 17 00:00:00 2001 From: Breno A Date: Fri, 31 May 2024 02:27:07 -0300 Subject: [PATCH] ci: add prp versioning --- .github/workflows/build.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 693eb54..7235f9e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,6 +24,21 @@ jobs: server-id: github # Value of the distributionManagement/repository/id field of the pom.xml settings-path: ${{ github.workspace }} # location for the settings.xml file + - name: Extract version from pom.xml + id: extract_version + run: | + version=$(xmllint --xpath "//*[local-name()='project']/*[local-name()='version']/text()" pom.xml) + echo "##[set-output name=VERSION;]$version" + + - name: Update PRP Files + uses: CIFriends/prp-preprocessor@v1 + with: + ignoredDirs: | + docs + src + target + env: + currentVersion: ${{ steps.extract_version.outputs.VERSION }} - name: Build Plugins run: mvn clean -B package --file pom.xml @@ -40,4 +55,4 @@ jobs: name: release path: staging env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}