From 17358720d264d5c7e40fb3ba0dd954bc966848db Mon Sep 17 00:00:00 2001 From: Mike Gerber Date: Tue, 1 Aug 2023 20:10:03 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20GitHub=20Actions:=20Try=20to=20f?= =?UTF-8?q?ix=20setuptools=20+=20git=20tags?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/release-check-version-tag | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-check-version-tag b/.github/workflows/release-check-version-tag index be3b943..7348a42 100755 --- a/.github/workflows/release-check-version-tag +++ b/.github/workflows/release-check-version-tag @@ -3,7 +3,7 @@ # We call setuptools.setup() here as we may rely on setuptools to interpret # a dynamic version field. (Reading pyproject.toml is not enough in that case.) expected_git_tag="v$(python -c 'from setuptools import setup; setup()' --version)" -actual_git_tag="$(git describe)" +actual_git_tag="$(git describe --tags)" if [[ "$expected_git_tag" == "$actual_git_tag" ]]; then echo "OK: Python package version $expected_git_tag matches git tag" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d3d38ee..f1fdb16 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 - name: Check git tag vs package version - run: python3 -m pip install --upgrade setuptools && git fetch --tags & git fetch --tags && .github/workflows/release-check-version-tag + run: python3 -m pip install --upgrade setuptools && .github/workflows/release-check-version-tag - name: Build package run: python3 -m pip install --upgrade build && python3 -m build - name: Upload dist