ruapu/.github/workflows/pypi.yml
Cocoa 550a9caa0f
added rust support (#50)
* added rust support

* move binding files to their respective directories

* updated README.md

* updated pypi ci package-dir

* add ruapu::rua() for rust
2024-02-28 23:34:26 +08:00

59 lines
1.3 KiB
YAML

name: pypi
#on: [push, pull_request]
on:
push:
tags:
- '*'
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: setup-qemu
if: matrix.os == 'ubuntu-latest'
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: cibuildwheel
uses: pypa/cibuildwheel@v2.16.5
env:
CIBW_ARCHS_LINUX: "x86_64 i686 aarch64 ppc64le s390x"
CIBW_ARCHS_MACOS: "x86_64 arm64 universal2"
CIBW_ARCHS_WINDOWS: "AMD64 x86 ARM64"
CIBW_BUILD: "cp311*"
CIBW_BUILD_VERBOSITY: 1
with:
package-dir: python
output-dir: wheelhouse
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl
upload_all:
permissions:
contents: none
name: Upload
needs: [build_wheels]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}