-
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added release job and bump pom tasks
- Loading branch information
Showing
3 changed files
with
35 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,25 +13,14 @@ jobs: | |
with: | ||
java-version: '11' | ||
distribution: 'adopt' | ||
|
||
- name: Expose git commit data | ||
uses: rlespinasse/[email protected] | ||
|
||
- name: Bump pom patch version for fixes and clean | ||
run: | | ||
mvn build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DprocessAllModules versions:commit | ||
if: "contains(env.GIT_COMMIT_MESSAGE_SUBJECT , 'Merge pull request') && | ||
(contains(env.GIT_COMMIT_MESSAGE_SUBJECT , 'fix') || contains(env.GIT_COMMIT_MESSAGE_SUBJECT , 'clean'))" | ||
|
||
- name: Bump pom minor version for feature | ||
- name: Bump pom according to commit message name | ||
run: | | ||
mvn build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.nextMinorVersion}.0 -DprocessAllModules versions:commit | ||
if: "contains(env.GIT_COMMIT_MESSAGE_SUBJECT , 'Merge pull request') && contains(env.GIT_COMMIT_MESSAGE_SUBJECT , 'feature')" | ||
bash .github/workflows/scripts/bump-pom.sh | ||
- name: Bump pom major version for major feature | ||
run: | | ||
mvn build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.nextMinorVersion}.0 -DprocessAllModules versions:commit | ||
if: "contains(env.commit_message, 'Merge pull request') && | ||
(contains(env.GIT_COMMIT_MESSAGE_SUBJECT , 'clean') || contains(env.GIT_COMMIT_MESSAGE_SUBJECT , 'major'))" | ||
- name: Retrieve the version | ||
run: | | ||
echo "version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV | ||
|
@@ -43,4 +32,4 @@ jobs: | |
default_author: github_actions | ||
message: Bump pom | ||
tag: ${{ env.version }} | ||
if: "contains(env.commit_message, 'Merge pull request')" | ||
if: "contains(env.commit_message, 'Merge pull request')" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/usr/bin/env bash | ||
|
||
if [[ $GIT_COMMIT_MESSAGE_SUBJECT =~ (Merge pull request.*feature) ]];then | ||
mvn build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.nextMinorVersion}.0 -DprocessAllModules versions:commit | ||
elif [[ $GIT_COMMIT_MESSAGE_SUBJECT =~ (Merge pull request.*major) ]];then | ||
mvn build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.nextMajorVersion}.0.0 -DprocessAllModules versions:commit | ||
else | ||
mvn build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DprocessAllModules versions:commit | ||
fi |