ci: only commit version.txt if a change happened

This commit is contained in:
Otto Bittner 2023-03-31 15:41:32 +02:00
parent 5e07efbb07
commit cc2bde9a3e

View File

@ -123,7 +123,7 @@ jobs:
git config --global user.name "release[bot]"
git config --global user.email "release[bot]@users.noreply.github.com"
git add version.txt
git commit -m "chore: update stamping version to ${{ inputs.version }}"
git diff --staged --quiet || git commit -m "chore: update version.txt to ${{ inputs.version }}"
git push origin "${BRANCH}"
micro-services:
@ -350,13 +350,6 @@ jobs:
git fetch
git checkout -b "${NEW_BRANCH}"
- name: Update CMakeLists.txt
run: |
sed -i "s/project(constellation LANGUAGES C VERSION [0-9]\+\.[0-9]\+\.[0-9]\+)/project(constellation LANGUAGES C VERSION 0.0.0)/" CMakeLists.txt
git add CMakeLists.txt
git commit -m "deps: set PROJECT_VERSION to prerelease"
git push --set-upstream origin "${NEW_BRANCH}"
- name: Create PR
uses: peter-evans/create-pull-request@38e0b6e68b4c852a5500a94740f0e535e0d7ba54 # v4.2.4
with: