From b00949479841f6b98d72491d8524250efd62c755 Mon Sep 17 00:00:00 2001 From: Anatoly Myachev Date: Thu, 6 Jun 2024 18:27:37 +0200 Subject: [PATCH] FEAT-#7265: Automatic publication of Modin wheel to PyPI (#7262) Signed-off-by: Anatoly Myachev Co-authored-by: Devin Petersohn --- .github/workflows/publish-to-pypi.yml | 44 +++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/publish-to-pypi.yml diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml new file mode 100644 index 00000000000..514a72481cb --- /dev/null +++ b/.github/workflows/publish-to-pypi.yml @@ -0,0 +1,44 @@ +name: Publish Modin wheel to PyPI + +on: + schedule: + - cron: "42 0 * * WED" + push: + tags: + - '*' + workflow_dispatch: + +jobs: + build-n-publish: + name: Build and publish Modin wheel to PyPI + environment: release + runs-on: ubuntu-latest + permissions: + id-token: write # IMPORTANT: this permission is mandatory for trusted publishing + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + fetch-tags: true + - name: Checkout latest git tag + run: git checkout $(git describe --tags "$(git rev-list --tags --max-count=1)") + if: github.event_name == 'push' + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.9.x" + + - name: Install/update tools + run: python3 -m pip install --upgrade build wheel + - name: Build a pure Python wheel + run: python3 setup.py sdist bdist_wheel + + - uses: actions/upload-artifact@v4 + with: + name: modin-wheel-and-source-tarball + path: ./dist/ + + - name: Publish Modin wheel to PyPI + if: github.event_name == 'push' + uses: pypa/gh-action-pypi-publish@release/v1