From 37120d638b3c277da463ab8bbb0d882d591a7a10 Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Mon, 10 Jun 2024 15:48:27 +0200 Subject: [PATCH] fix sdist --- .github/workflows/cibuildwheel.yml | 7 +++-- .github/workflows/publish.yml | 48 ------------------------------ 2 files changed, 5 insertions(+), 50 deletions(-) delete mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/cibuildwheel.yml b/.github/workflows/cibuildwheel.yml index 785576ca..d71eb83b 100644 --- a/.github/workflows/cibuildwheel.yml +++ b/.github/workflows/cibuildwheel.yml @@ -80,9 +80,11 @@ jobs: build_sdist: name: Build source distribution - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Build sdist run: > @@ -91,7 +93,8 @@ jobs: - uses: actions/upload-artifact@v4 with: - path: dist/*.tar.gz + name: pypi-artifacts + path: ${{ github.workspace }}/dist/*.tar.gz show-artifacts: needs: [build_bdist, build_sdist] diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index f9c18734..00000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Publish to PyPI - -on: ["push", "pull_request"] - -jobs: - packages: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v5 - with: - python-version: 3.x - - - name: Get tags - run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* - shell: bash - - - name: Install build tools - run: | - python -m pip install --upgrade pip wheel setuptools setuptools_scm build twine check-manifest numpy - - shell: bash - - - name: Build binary wheel - run: python -m build --sdist --wheel . --outdir dist - - - name: CheckFiles - run: | - ls dist - shell: bash - - - name: Test wheels and sdist - run: | - python setup.py --version - check-manifest --verbose - cd dist && python -m pip install cftime*.whl - python -m twine check * - - shell: bash - - - name: Publish a Python distribution to PyPI - if: ${{ github.event_name == 'release' }} - uses: pypa/gh-action-pypi-publish@master - with: - user: __token__ - password: ${{ secrets.PYPI_PASSWORD }}