Skip to content

Commit

Permalink
Use Maven Wrapper if available
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Sep 18, 2024
1 parent 323e91f commit 05b32bd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/perform-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,16 @@ jobs:
java-version: 21
cache: 'maven'

- name: Detect Maven Wrapper
run: |
if [ -f mvnw ]; then
echo "MAVEN_EXEC=./mvnw" >> $GITHUB_ENV
else
echo "MAVEN_EXEC=mvn" >> $GITHUB_ENV
fi
- name: Deploy release ${{env.RELEASE_VERSION}}
run: mvn deploy -DperformRelease -DaltDeploymentRepository=local::file://${{ github.workspace }}/repository
run: ${MAVEN_EXEC} deploy -DperformRelease -DaltDeploymentRepository=local::file://${{ github.workspace }}/repository

- name: Tarball the artifacts
run: tar -czvf ${ARTIFACT_PATH} -C repository .
Expand Down
12 changes: 10 additions & 2 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,18 @@ jobs:
java-version: 21
cache: 'maven'

- name: Detect Maven Wrapper
run: |
if [ -f mvnw ]; then
echo "MAVEN_EXEC=./mvnw" >> $GITHUB_ENV
else
echo "MAVEN_EXEC=mvn" >> $GITHUB_ENV
fi
- name: Maven release ${{env.CURRENT_VERSION}}
run: |
mvn -B release:prepare -Prelease -Dgpg.skip=true -DreleaseVersion=${CURRENT_VERSION} -DdevelopmentVersion=${NEXT_VERSION} -DscmCommentPrefix="[skip ci] " -Drelease.arguments="-Dgpg.skip=true"
mvn -B release:clean
${MAVEN_EXEC} -B release:prepare -Prelease -Dgpg.skip=true -DreleaseVersion=${CURRENT_VERSION} -DdevelopmentVersion=${NEXT_VERSION} -DscmCommentPrefix="[skip ci] " -Drelease.arguments="-Dgpg.skip=true"
${MAVEN_EXEC} -B release:clean
- name: Push changes to ${{github.base_ref}} branch and tag ${{env.CURRENT_VERSION}}
run: |
Expand Down

0 comments on commit 05b32bd

Please sign in to comment.