Skip to content

Commit 9a9d2a5

Browse files
BUG FIX: update release action to remove changes to the repo
1 parent 4598530 commit 9a9d2a5

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,8 @@ jobs:
116116
exit 0
117117
fi
118118
119-
mvn -q -B versions:set -DnewVersion="${TAG_NAME}" -DgenerateBackupPoms=false
120-
if ! git diff --quiet; then
121-
git config user.name "github-actions[bot]"
122-
git config user.email "github-actions[bot]@users.noreply.github.com"
123-
git add -A
124-
git commit -m "Release ${TAG_NAME}: set project version to ${TAG_NAME}"
125-
else
126-
echo "No changes to commit (version already ${TAG_NAME})."
127-
fi
119+
# We skip committing changes to the repo. Use versions:set only in the build step ephemerally.
120+
echo "Skipping persistent version bump in pom.xml to avoid branch protection issues."
128121
129122
git fetch --prune --tags origin
130123
if git rev-parse "${TAG_NAME}" >/dev/null 2>&1; then
@@ -160,15 +153,13 @@ jobs:
160153
java-version: 21
161154
cache: maven
162155

163-
- name: In dry run - set project version to computed tag (no commit)
164-
if: ${{ github.event.inputs.dry_run == 'true' }}
156+
- name: Set project version for build (ephemeral)
165157
env:
166158
TAG_NAME: ${{ needs.prepare-release.outputs.tag_name }}
167159
shell: bash
168160
run: |
169161
set -euo pipefail
170162
mvn -q -B versions:set -DnewVersion="${TAG_NAME}" -DgenerateBackupPoms=false
171-
# No commit; only adjust the working tree so the built artifact names match
172163
173164
- name: Build JARs
174165
shell: bash

0 commit comments

Comments
 (0)