Skip to content

Commit 2e8c32c

Browse files
authored
Use release_version directly in version bump PR (#683)
1 parent 7598c39 commit 2e8c32c

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

.github/workflows/publish.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -181,24 +181,22 @@ jobs:
181181

182182
- name: Bump version and create PR
183183
run: |
184-
IFS='.' read -r MAJOR MINOR PATCH <<< "${RELEASE_VERSION}"
185-
NEXT_VERSION="${MAJOR}.${MINOR}.$((PATCH + 1))"
186184
TARGET_BRANCH="${{ matrix.spark == '3.5' && 'master' || format('release/{0}-spark-{1}', inputs.release_version, matrix.spark) }}"
187-
BRANCH_NAME="bump-version-${NEXT_VERSION}-spark-${SPARK_VERSION}"
185+
BRANCH_NAME="bump-version-${RELEASE_VERSION}-spark-${SPARK_VERSION}"
188186
189187
git config user.name "github-actions[bot]"
190188
git config user.email "github-actions[bot]@users.noreply.github.com"
191189
192190
git checkout -b "${BRANCH_NAME}"
193-
mvn versions:set -DnewVersion="${NEXT_VERSION}-spark-${SPARK_VERSION}" -DgenerateBackupPoms=false
191+
mvn versions:set -DnewVersion="${RELEASE_VERSION}-spark-${SPARK_VERSION}" -DgenerateBackupPoms=false
194192
git add pom.xml
195-
git commit -m "Update version in pom.xml to ${NEXT_VERSION}-spark-${SPARK_VERSION}"
193+
git commit -m "Update version in pom.xml to ${RELEASE_VERSION}-spark-${SPARK_VERSION}"
196194
git push origin "${BRANCH_NAME}"
197195
198196
gh pr create \
199197
--base "${TARGET_BRANCH}" \
200198
--head "${BRANCH_NAME}" \
201-
--title "Update version in pom.xml to ${NEXT_VERSION}-spark-${SPARK_VERSION}" \
199+
--title "Update version in pom.xml to ${RELEASE_VERSION}-spark-${SPARK_VERSION}" \
202200
--body "Automated version bump after publishing ${RELEASE_VERSION}-spark-${SPARK_VERSION} to Maven Central."
203201
env:
204202
RELEASE_VERSION: ${{ inputs.release_version }}

0 commit comments

Comments
 (0)