diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml index ee28bee..044764f 100644 --- a/.github/workflows/publish-to-pypi.yml +++ b/.github/workflows/publish-to-pypi.yml @@ -19,6 +19,11 @@ jobs: pip install build --user + - name: Get history and tags for SCM versioning to work + run: | + git branch + git fetch --prune --unshallow + git fetch --depth=1 origin +refs/tags/*:refs/tags/* - name: Build a binary wheel and a source tarball run: python3 -m build - name: Store the distribution packages diff --git a/pyproject.toml b/pyproject.toml index 9f82766..3f6a7cf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,6 +41,9 @@ dynamic = [ 'version'] [tool.hatch.version] source = 'vcs' +[tool.hatch.version.raw-options] +local_scheme = "no-local-version" # otherwise the non-tagged version is not accepted by testpypi + [project.optional-dependencies] dev = [ "mkdocstrings[python]",