1515jobs :
1616 update-version :
1717 runs-on : ubuntu-latest
18+ env :
19+ LIBRARY_VERSION : ${{ github.event.inputs.libraryVersion }}
20+ PACKAGE_VERSION : ${{ github.event.inputs.packageVersion }}
21+
1822 steps :
1923 - name : Checkout code
20- uses : actions/checkout@v2
21-
22- - name : Create new branch
23- run : git checkout -b release/${{ github.event.inputs.packageVersion }}
24+ uses : actions/checkout@v4
2425
2526 - name : Update Version
2627 run : |
27- sed -i '/VERSION=/!b;cVERSION=\"v${{ github.event.inputs.libraryVersion }}";' ./download-libs.sh
28- sed -i '/<packaging>jar<\/packaging>/,/<name>/s/<version>[^<]*<\/version>/<version>${{ github.event.inputs.libraryVersion }}<\/version>/' pom.xml
29- - name : Commit, Tag and Push
30- run : |
31- git add ./download-libs.sh
32- git add pom.xml
33- git config user.name github-actions
34- git config user.email [email protected] 35- git commit -m "chore(package version): updated version" | exit 0
36- git tag ${{ github.event.inputs.packageVersion }}
37- git push --set-upstream origin release/${{ github.event.inputs.packageVersion }}
38- git push --tags
28+ sed -i -E 's/^([[:space:]]*)VERSION="[^"]*"/\1VERSION="v${{ env.LIBRARY_VERSION }}"/' ./download-libs.sh
29+ sed -i '/<packaging>jar<\/packaging>/,/<name>/s/<version>[^<]*<\/version>/<version>${{ env.LIBRARY_VERSION }}<\/version>/' pom.xml
30+
31+ - name : Create Pull Request
32+ uses : peter-evans/create-pull-request@v5
33+ with :
34+ branch : ci/${{ env.PACKAGE_VERSION }}
35+ title : " chore: bump package version to ${{ env.PACKAGE_VERSION }}"
36+ commit-message : " chore(package version): updated version"
37+ body : |
38+ Automated package version bump.
39+ base : master
40+ add-paths : |
41+ ./download-libs.sh
42+ pom.xml
0 commit comments