Skip to content

Commit 1cb580b

Browse files
authored
Update maven-publish.yml
1 parent 49073d0 commit 1cb580b

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

.github/workflows/maven-publish.yml

+9-9
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717

1818
steps:
1919
- uses: actions/checkout@v2
20+
with:
21+
ref: ${{ github.event.release.head.ref }}
2022

2123
- name: Set up Java for publishing to Maven Central Repository
2224
uses: actions/setup-java@v2
@@ -57,12 +59,10 @@ jobs:
5759
- name: Roll pom version to next patch version
5860
run: mvn build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion}-SNAPSHOT versions:commit
5961

60-
- name: Commit New Snapshot Version (if changed)
61-
run: |
62-
if [[ `git status --porcelain` ]]; then
63-
git config --global user.name 'mmadson'
64-
git config --global user.email '[email protected]'
65-
git add -A
66-
git commit -m "Rolling Maven Version to next snapshot"
67-
git push
68-
fi
62+
- name: Commit Pom Version Changes Back to main branch
63+
uses: EndBug/add-and-commit@v7
64+
with:
65+
author_name: Matt Madson
66+
author_email: [email protected]
67+
branch: main
68+
message: 'Roll Pom Version'

0 commit comments

Comments
 (0)