From 8e3b6d189c402ab47d8ee8d70ba6a3848f9016c1 Mon Sep 17 00:00:00 2001 From: Matthias Kay Date: Fri, 17 Nov 2023 23:44:31 +0100 Subject: [PATCH] fix: get version number from commit message (#29) --- .github/workflows/update_release_branch.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/update_release_branch.yml b/.github/workflows/update_release_branch.yml index 4a7d6d21f..b3e1716eb 100644 --- a/.github/workflows/update_release_branch.yml +++ b/.github/workflows/update_release_branch.yml @@ -29,14 +29,11 @@ jobs: - name: Set release version id: set_release_version env: - MAJOR: "1" - MINOR: "2" - PATCH: "3" + HEAD_COMMIT_TITLE: ${{ github.event.head_commit.message }} run: | - echo "$MAJOR $MINOR $PATCH" - echo The Title of your PR is ${{ github.event.pull_request.title }} file=$(find . -name "version.py") - sed -i "s/^VERSION .*$/VERSION = \"$MAJOR.$MINOR.$PATCH\"/" $file + version_number=${HEAD_COMMIT_TITLE##* } + sed -i "s/^VERSION .*$/VERSION = \"$version_number\"/" $file - uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: set release version