diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index 00a395d..9672eff 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -17,6 +17,7 @@ jobs: packages: write steps: + - uses: actions/checkout@v3 - name: Set up JDK 11 uses: actions/setup-java@v3 @@ -26,6 +27,11 @@ 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: Set version + run: | + echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV + mvn versions:set -DnewVersion=$RELEASE_VERSION + - name: Build with Maven run: mvn -B package --file pom.xml