Skip to content

Commit c4519f1

Browse files
committed
Configure push of versions changes
1 parent 27336a7 commit c4519f1

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

.github/workflows/release-workflow.yml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -227,31 +227,27 @@ jobs:
227227
# as described in https://stackoverflow.com/a/70157413
228228
MAVEN_OPTS: --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED
229229

230-
- name: Create release commit
230+
- name: Set versions
231231
continue-on-error: true
232232
run: |
233-
git config user.name github-actions
234-
git config user.email [email protected]
235-
236233
release_version=${{ github.event.inputs.release_version }}
237234
release_branch_name=${release_version%.*}.x
238235
echo "release_branch_name=$release_branch_name" >> $GITHUB_ENV
239236
240-
git fetch
241-
git checkout -b $release_branch_name --track origin/$release_branch_name || true
242-
git checkout -b $release_branch_name
243-
244237
# Set version in pom.xml files
245238
mvn clean install -DskipTests -Dmaven.javadoc.skip=true
246239
mvn versions:set -DnewVersion=${{ github.event.inputs.release_version }}
247240
mvn versions:commit
248241
# Set version in Antora module
249242
yq eval -i '.version = "${{ github.event.inputs.release_version }}"' documentation/developer-guide/antora.yml
250-
# Push changes
251-
git add .
252-
if git commit -m "Add version ${{ github.event.inputs.release_version}}"; then
253-
git push origin ${{ env.release_branch_name }}
254-
fi
243+
244+
- name: Commit version changes and push to upstream repository
245+
uses: stefanzweifel/git-auto-commit-action@v4
246+
with:
247+
branch: ${{ env.release_branch_name }}
248+
commit_user_name: github-actions
249+
commit_user_email: [email protected]
250+
commit_author: Author <[email protected]>
255251

256252
# Full release: Github
257253
- name: "Create Github release (full)"

0 commit comments

Comments
 (0)