From 7f4ffbcf199e19722f6b44d52d6d1c8cdf18b4b0 Mon Sep 17 00:00:00 2001 From: Guillaume Gay Date: Wed, 14 Feb 2024 08:55:33 +0100 Subject: [PATCH] use pypi --- .github/workflows/python-package-conda.yml | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 40c0c6d2..34375e9d 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -43,3 +43,36 @@ jobs: run: | mamba install pytest make test + + make_sdist: + name: Make SDist + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # Optional, use if you use setuptools_scm + submodules: true # Optional, use if you have submodules + + - name: Build SDist + run: pipx run build --sdist + + - uses: actions/upload-artifact@v4 + with: + name: cibw-sdist + path: dist/*.tar.gz + + upload_all: + needs: [build_wheels, make_sdist] + environment: pypi + permissions: + id-token: write + runs-on: ubuntu-latest + if: github.event_name == 'release' && github.event.action == 'published' + steps: + - uses: actions/download-artifact@v4 + with: + pattern: cibw-* + path: dist + merge-multiple: true + + - uses: pypa/gh-action-pypi-publish@release/v1