File tree 1 file changed +49
-0
lines changed
1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Prepare release version
2
+ on :
3
+ workflow_dispatch :
4
+
5
+ jobs :
6
+ extract_version :
7
+ runs-on : ubuntu-latest
8
+ permissions :
9
+ contents : read
10
+ outputs :
11
+ next_patch : ${{ steps.semvers.outputs.patch }}
12
+ steps :
13
+ - uses : actions/checkout@v4
14
+ - name : Fetch latest tag if manually triggered
15
+ id : get_latest_tag
16
+ run : |
17
+ # Extract the revision version using a regex
18
+ revision_version=$(grep -oP '(?<=<revision>)(.*?)(?=</revision>)' pom.xml)
19
+ echo "latest_tag=$revision_version" >> $GITHUB_OUTPUT
20
+ - name : 🤖 Get next minor version
21
+ id : semvers
22
+ uses :
WyriHaximus/[email protected]
23
+ with :
24
+ version : ${{ steps.get_latest_tag.outputs.latest_tag }}
25
+
26
+ version_bump :
27
+ runs-on : ubuntu-latest
28
+ needs : extract_version
29
+ permissions :
30
+ contents : write
31
+ pull-requests : write
32
+ issues : write
33
+ steps :
34
+ - uses : actions/checkout@v4
35
+ - name : ☕ Set up JDK 21
36
+ uses : actions/setup-java@v4
37
+ with :
38
+ java-version : ' 21'
39
+ distribution : ' temurin'
40
+ cache : ' maven'
41
+ - name : Update Maven POM
42
+ run : |
43
+ mvn versions:set-property -Dproperty=revision -DnewVersion=${{ needs.extract_version.outputs.next_patch }} -DgenerateBackupPoms=false
44
+ - name : 💅 Create Pull Request
45
+ uses :
peter-evans/[email protected]
46
+ with :
47
+ title : " chore: Update POM version to ${{ needs.extract_version.outputs.next_patch }} 🤖"
48
+ branch : " automated/version-bump-${{ github.run_id }}"
49
+ base : main
You can’t perform that action at this time.
0 commit comments