Skip to content

ci update

ci update #40

Workflow file for this run

name: Python
on:
push:
branches: [ "main" ]
tags:
- '*'
pull_request:
branches: [ "main" ]
env:
PACKAGE_NAME: rocraters
PYTHON_VERSION: "3.7" # to build abi3 wheels
# Modified slightly from crfs-rs Python.yml
jobs:
linux:
runs-on: ubuntu-latest
strategy:
matrix:
target: [x86_64, i686]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
architecture: x64
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
manylinux: auto
args: --release --out dist -m python/Cargo.toml
- name: Install built wheel
if: matrix.target == 'x86_64'
run: |
pip install dist/${{ env.PACKAGE_NAME }}-*.whl --no-index --find-links dist --force-reinstall
python -c "import rocraters"
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
release:
name: Release
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
needs: [linux]
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
steps:
- uses: actions/download-artifact@v3
with:
name: wheels
path: dist
- name: Publish to PyPI
uses: PyO3/maturin-action@v1
with:
command: upload
args: --repository=testpypi --non-interactive --skip-existing *