From 27a6f94baf86f9e5bcd260fe41b7f3442ddfea1c Mon Sep 17 00:00:00 2001 From: Max Jones <14077947+maxrjones@users.noreply.github.com> Date: Tue, 18 Jun 2024 13:46:08 -0400 Subject: [PATCH] Use default version scheme for setuptools_scm (#149) Co-authored-by: Tom Nicholas --- .github/workflows/release.yml | 13 +++---------- pyproject.toml | 1 - 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c5b6a5b8..fd645e6e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,8 +5,8 @@ on: - published # push: # branches: [ "main" ] - # pull_request: - # branches: [ "main" ] + pull_request: + branches: [ "main" ] permissions: contents: read @@ -29,14 +29,6 @@ jobs: python -m pip install setuptools setuptools-scm wheel twine check-manifest git clean -xdf git restore -SW . - # This step is only necessary for testing purposes and for TestPyPI - - name: Fix up version string for TestPyPI - if: ${{ !startsWith(github.ref, 'refs/tags') }} - run: | - # Change setuptools-scm local_scheme to "no-local-version" so the - # local part of the version isn't included, making the version string - # compatible with PyPI. - sed --in-place "s/guess-next-dev/no-local-version/g" pyproject.toml - name: Build tarball and wheels run: | python -m build --sdist --wheel . @@ -82,6 +74,7 @@ jobs: python -m pip install dist/virtualizarr*.whl python -c "import virtualizarr; print(virtualizarr.__version__)" - name: Publish package to TestPyPI + if: github.event_name == 'release' uses: pypa/gh-action-pypi-publish@v1.8.14 with: repository-url: https://test.pypi.org/legacy/ diff --git a/pyproject.toml b/pyproject.toml index 156b82e9..9e1bde4e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,6 @@ requires = [ ] [tool.setuptools_scm] -local_scheme = "guess-next-dev" fallback_version = "9999" [tool.setuptools.packages.find]