From 9f38e09975d78546b33e7ec3213a04a491e6db7d Mon Sep 17 00:00:00 2001 From: David Gidwani Date: Sun, 10 Mar 2024 19:13:57 -0400 Subject: [PATCH] ci: :ferris_wheel: only incr version for wheel building on push --- .github/workflows/publish.yml | 2 ++ .github/workflows/wheels.yml | 1 + 2 files changed, 3 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8950a06..b94a27a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -25,6 +25,8 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Download artifacts uses: actions/download-artifact@v4 diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 673378e..48545f7 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -244,6 +244,7 @@ jobs: - name: Increment version if releasing id: semantic-version + if: github.event_name != 'workflow_call' run: | current_version=$(grep '^version =' pyproject.toml | head -1 | cut -d '"' -f 2) next_version=$(pdm run semantic-release version --patch --print 2>/dev/null)