Skip to content

Update deploy.yml

Update deploy.yml #59

Workflow file for this run

name: Python PySDD package
on:
push:
branches: [ deploy ]
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest, macos-13, macos-14]
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Build wheels
uses: pypa/[email protected]
env:
# configure cibuildwheel to build native archs ('auto') and ARM64
CIBW_ARCHS_LINUX: auto aarch64
CIBW_SKIP: cp36-* cp37-* pp* *i686 *ppc64le *s390x *win32*
CIBW_TEST_REQUIRES: pytest
CIBW_TEST_COMMAND: "pytest {project}/tests"
CIBW_BEFORE_ALL: "pip install SCons && cd pysdd/lib/libsdd-2.0 && scons && cp -r build ../sdd-2.0/lib"
- uses: actions/upload-artifact@v4
with:
name: dist-${{ matrix.os }}-${{ matrix.python-version }}
path: ./wheelhouse/*.whl
build_sdist:
name: Prepare source distribution
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Build
run: |
python -m pip install build
python -m build --sdist
- name: Store artifacts
uses: actions/upload-artifact@v4
with:
name: dist-source
path: dist/*.tar.gz
upload_wheels:
name: Upload wheels to PyPi
runs-on: ubuntu-latest
# upload to PyPI on every tag starting with 'v'
# if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
needs: [ build_wheels,build_sdist ]
steps:
- uses: actions/download-artifact@v4
with:
pattern: dist-*
merge-multiple: true
path: dist
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: dist/
skip_existing: true