diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1e7c8f55..9d69a172 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,8 +6,8 @@ on: - published jobs: - build_wheels: - name: build wheel + build_packages: + name: build wheel & source distribtions runs-on: ${{ matrix.os }} strategy: matrix: @@ -26,34 +26,19 @@ jobs: with: path: ${{ env.pythonLocation }} key: build-${{ runner.os }}-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml', 'setup.*') }} - - name: build wheel - run: pip wheel . -w dist --no-deps - - name: save wheel + - name: install build package + run: pip install build + - name: build package + run: python -m build + - name: save builds uses: actions/upload-artifact@v2 with: name: build - path: ./dist/*.whl - build_sdist: - name: package source - runs-on: ubuntu-latest - steps: - - name: checkout repository - uses: actions/checkout@v2 - - name: install Python - uses: actions/setup-python@v2 - - name: install dependencies - run: pip install dunamai - - name: package source - run: python setup.py sdist - - name: save source package - uses: actions/upload-artifact@v2 - with: - name: build - path: ./dist/*.tar.gz + path: ./dist upload_pypi: if: github.event_name == 'release' name: publish to PyPI - needs: [ build_wheels, build_sdist ] + needs: [ build_packages ] runs-on: ubuntu-latest steps: - name: retrieve wheel(s) and source diff --git a/pyproject.toml b/pyproject.toml index 5708141c..1ee467cd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2", "wheel", "numpy"] +requires = ["setuptools>=45", "setuptools_scm[toml]>=7", "wheel", "numpy"] build-backend = "setuptools.build_meta" [tool.setuptools_scm] @@ -17,7 +17,7 @@ maintainers = [ {name = "Soroosh Mani", email = "soroosh.mani@noaa.gov"} ] description = "Package to generate computational unstructured meshes from planetary modeling." -license = {file = "CC0"} +license = {file = "LICENSE"} readme = "README.md" requires-python = '>=3.7, <3.10' dependencies = [