Skip to content

Commit e926233

Browse files
The release pipeline should not fail if nothing to commit
1 parent ee392b6 commit e926233

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,8 @@ jobs:
3939
shell: bash
4040
run: |
4141
echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_OUTPUT
42-
mvn versions:set -DnewVersion=${{ github.event.inputs.version }}-SNAPSHOT
43-
git commit -m "Releasing version ${{ github.event.inputs.version }}" pom.xml
44-
git push origin main
42+
mvn -ntp -B versions:set -DnewVersion=${{ github.event.inputs.version }}-SNAPSHOT
43+
git diff-index --quiet HEAD || git commit -m "Releasing version ${{ github.event.inputs.version }}" pom.xml
4544
4645
- name: Publish to GitHub Packages
4746
run: mvn -ntp -B release:prepare release:perform

0 commit comments

Comments
 (0)