Skip to content

new deploy

new deploy #184

Workflow file for this run

name: Deploy
on: push
jobs:
build-win:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-2022]
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: "3.10"
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.12.1
- name: Build wheels
run: python -m cibuildwheel --output-dir dist
- uses: actions/upload-artifact@v3
with:
name: windows-wheels
path: dist/*.whl
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9 # Versione Python per il build system
- name: Install cibuildwheel
run: pip install cibuildwheel
- name: Build wheels
run: cibuildwheel --output-dir wheelhouse
deploy-pypi:
runs-on: ubuntu-latest
needs: [build-linux, build-win]
if: github.ref == 'refs/heads/master' # We only deploy on master commits
steps:
- name: Checkout repo
uses: actions/checkout@master
with:
fetch-depth: 0
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Set up Python 3.8
uses: actions/setup-python@v1
with:
python-version: 3.8
- uses: actions/download-artifact@master
with:
name: linux-wheel
path: dist
- uses: actions/download-artifact@master
with:
name: windows-wheels
path: dist
- run: ls dist
- name: Upload to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}