From 5d6e6975a9ceb53f38be2a0a0e0b5c69c6d6dda8 Mon Sep 17 00:00:00 2001 From: Frank Hoffmann <15r10nk-git@polarbit.de> Date: Wed, 18 Dec 2024 08:50:25 +0100 Subject: [PATCH] ci: fix github release step --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41721f0..f437bbb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -112,10 +112,13 @@ jobs: fetch-depth: 0 - name: Check if the commit has a vx.y.z tag + id: check-version run: | if git tag --list --points-at ${{ github.sha }} | grep -q -E '^v[0-9]+\.[0-9]+\.[0-9]+$'; then + echo "is new version" echo "should_continue=true" >> "$GITHUB_OUTPUT" else + echo "is not a new version" echo "should_continue=false" >> "$GITHUB_OUTPUT" fi @@ -125,9 +128,11 @@ jobs: run: hatch build - name: Publish package distributions to PyPI + if: ${{ steps.check-version.outputs.should_continue == true }} uses: pypa/gh-action-pypi-publish@67339c736fd9354cd4f8cb0b744f2b82a74b5c70 # v1.12.3 - name: create github release + if: ${{ steps.check-version.outputs.should_continue == true }} env: GITHUB_TOKEN: ${{ github.token }} run: scriv github-release