Skip to content

Release Apache Sedona 1.6.1 (#8) #49

Release Apache Sedona 1.6.1 (#8)

Release Apache Sedona 1.6.1 (#8) #49

name: Python publish wheels to Pypi
# Example from https://github.com/pypa/cibuildwheel/blob/main/examples/github-deploy.yml
# publish when a GitHub Release is created
on:
push:
pull_request:
release:
types:
- published
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-latest', 'windows-latest', 'macos-latest']
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: Build wheels
uses: pypa/cibuildwheel@v2.16.5
env:
CIBW_SKIP: 'pp* *musl*'
CIBW_ARCHS_LINUX: 'x86_64 aarch64'
CIBW_ARCHS_WINDOWS: 'AMD64 ARM64'
CIBW_ARCHS_MACOS: 'x86_64 arm64'
with:
package-dir: python
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build sdist
run: cd python && pipx run build --sdist
- uses: actions/upload-artifact@v3
with:
path: python/dist/*.tar.gz
upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
# publish when a GitHub Release is created
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v3
with:
# unpacks default artifact into dist/
# if `name: artifact` is omitted, the action will create extra parent dir
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@v1.5.0
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
# repository_url: https://test.pypi.org/legacy/ # to test