File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -63,10 +63,19 @@ jobs:
6363 git config --global user.email "[email protected] " 6464 git add build.gradle.kts
6565 git add increment_version.sh
66- git commit -m "Bump version to $NEW_VERSION"
66+ git commit -m "Bump version to $NEW_VERSION" || echo "No changes to commit"
6767 git tag $NEW_VERSION
68- git push -f https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/aymenbs2/AymoAi.git --tags
69- git push -f https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/aymenbs2/AymoAi.git HEAD:main
68+
69+ - name : Push changes if any
70+ env :
71+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
72+ run : |
73+ if [ -z "$(git status --porcelain)" ]; then
74+ echo "No changes to push"
75+ else
76+ git push -f https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/aymenbs2/AymoAi.git --tags
77+ git push -f https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/aymenbs2/AymoAi.git HEAD:main
78+ fi
7079
7180 - name : Build with Gradle
7281 run : ./gradlew build
You can’t perform that action at this time.
0 commit comments