From ffb96704a399ef4572e560d9a1a5cf5540d14b5a Mon Sep 17 00:00:00 2001 From: Roger Date: Fri, 17 Nov 2023 17:26:05 +0100 Subject: [PATCH] chore: semantic-release.yml --- .github/workflows/semantic-release.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/semantic-release.yml b/.github/workflows/semantic-release.yml index 7350f51..02e75e8 100644 --- a/.github/workflows/semantic-release.yml +++ b/.github/workflows/semantic-release.yml @@ -21,6 +21,14 @@ jobs: contents: write steps: + - name: Check triggered by new release + run: | + if [[ ${{ github.event.head_commit.message }} =~ ^\d+\.\d+\.\d+ ]]; then + echo "Workflow triggered by new realease" + else + echo "Commit message does not match pattern" + fi + - name: Checkout repository uses: actions/checkout@v4 with: @@ -37,6 +45,7 @@ jobs: pip install -r requirements.txt - name: Python Semantic Release + if: ${{ ! startsWith(github.event.head_commit.message, '[0-9]+.[0-9]+.[0-9]+') }} uses: python-semantic-release/python-semantic-release@master with: github_token: ${{ secrets.GITHUB_TOKEN }}