@@ -114,48 +114,48 @@ jobs:
114114 github_token : ${{ secrets.GITHUB_TOKEN }}
115115 branch : ${{ github.ref }}
116116
117- bump :
118- if : " !contains(github.event.head_commit.message, '[version bump]') && contains(github.ref, 'release')"
119- runs-on : ubuntu-latest
120- needs : [ publish ]
121- steps :
122-
123- - name : Checkout Main Branch
124- uses : actions/checkout@v2
125- with :
126- ref : main
127- - name : Setup Build Cache
128- uses : actions/cache@v1
129- with :
130- path : ~/.m2/repository
131- key : ${{ runner.os }}-m2
132- restore-keys : |
133- ${{ runner.os }}-m2
134- - name : Set up JDK 11
135- uses : actions/setup-java@v1
136- with :
137- java-version : 11
138- - name : Configure Git user
139- run : |
140- git config user.email "actions@github.com"
141- git config user.name "GitHub Actions"
142- - name : Get version from POM without SNAPSHOT
143- run : |
144- VERSION_PARTS=($(mvn help:evaluate -Dexpression=project.version -q -DforceStdout | cut -d- -f1 | tr "." "\n"))
145- echo "MAJOR=${VERSION_PARTS[0]}" >> $GITHUB_ENV
146- echo "MINOR=${VERSION_PARTS[1]}" >> $GITHUB_ENV
147- echo "PATCH=${VERSION_PARTS[2]}" >> $GITHUB_ENV
148- - name : Bump And Update POM Version to new Development version
149- run : |
150- NEW_VERSION="$((MAJOR)).$((MINOR)).$((PATCH+1))-SNAPSHOT"
151- echo "New development version is: $NEW_VERSION"
152- mvn versions:set -DnewVersion=${NEW_VERSION} -DgenerateBackupPoms=false
153- - name : Commit files
154- run : |
155- git commit -m "[version bump] new dev version" -a
156-
157- - name : Push Development Version to Main Branch
158- uses : ad-m/github-push-action@master
159- with :
160- github_token : ${{ secrets.GITHUB_TOKEN }}
161- branch : main
117+ bump :
118+ if : " !contains(github.event.head_commit.message, '[version bump]') && contains(github.ref, 'release')"
119+ runs-on : ubuntu-latest
120+ needs : [ publish ]
121+ steps :
122+
123+ - name : Checkout Main Branch
124+ uses : actions/checkout@v2
125+ with :
126+ ref : main
127+ - name : Setup Build Cache
128+ uses : actions/cache@v1
129+ with :
130+ path : ~/.m2/repository
131+ key : ${{ runner.os }}-m2
132+ restore-keys : |
133+ ${{ runner.os }}-m2
134+ - name : Set up JDK 11
135+ uses : actions/setup-java@v1
136+ with :
137+ java-version : 11
138+ - name : Configure Git user
139+ run : |
140+ git config user.email "actions@github.com"
141+ git config user.name "GitHub Actions"
142+ - name : Get version from POM without SNAPSHOT
143+ run : |
144+ VERSION_PARTS=($(mvn help:evaluate -Dexpression=project.version -q -DforceStdout | cut -d- -f1 | tr "." "\n"))
145+ echo "MAJOR=${VERSION_PARTS[0]}" >> $GITHUB_ENV
146+ echo "MINOR=${VERSION_PARTS[1]}" >> $GITHUB_ENV
147+ echo "PATCH=${VERSION_PARTS[2]}" >> $GITHUB_ENV
148+ - name : Bump And Update POM Version to new Development version
149+ run : |
150+ NEW_VERSION="$((MAJOR)).$((MINOR)).$((PATCH+1))-SNAPSHOT"
151+ echo "New development version is: $NEW_VERSION"
152+ mvn versions:set -DnewVersion=${NEW_VERSION} -DgenerateBackupPoms=false
153+ - name : Commit files
154+ run : |
155+ git commit -m "[version bump] new dev version" -a
156+
157+ - name : Push Development Version to Main Branch
158+ uses : ad-m/github-push-action@master
159+ with :
160+ github_token : ${{ secrets.GITHUB_TOKEN }}
161+ branch : main
0 commit comments