Skip to content

Merge pull request #9 from saullocastro/lp_gradients #53

Merge pull request #9 from saullocastro/lp_gradients

Merge pull request #9 from saullocastro/lp_gradients #53

Workflow file for this run

name: Upload Python Package
on:
push:
tags:
- '*.*.*'
jobs:
deploy:
strategy:
matrix:
runs-on: [ubuntu-latest, windows-latest, macos-latest]
python-version: [3.8, 3.9, '3.10', '3.11', '3.12']
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
if: matrix.runs-on == 'windows-latest' || (matrix.runs-on == 'ubuntu-latest') || (matrix.runs-on == 'macos-latest')
run: |
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade setuptools wheel twine
python3 -m pip install -r ci_requirements.txt
- name: Upload source code
if: matrix.runs-on == 'ubuntu-latest' && matrix.python-version == '3.12'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python3 setup.py sdist
python3 -m twine upload dist/*.tar.gz
- name: Build Windows or MAC-OS Python wheels
if: matrix.runs-on == 'windows-latest' || matrix.runs-on == 'macos-latest'
run: |
python3 setup.py sdist bdist_wheel
- name: Publish Windows or MAC-OS Python wheels
if: matrix.runs-on == 'windows-latest' || matrix.runs-on == 'macos-latest'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python3 -m twine upload dist/*.whl
- name: Build Linux Python wheels, install cibuildwheel
if: matrix.runs-on == 'ubuntu-latest'
run: |
python -m pip install cibuildwheel==2.16.5
- name: Build Linux Python wheels
if: matrix.runs-on == 'ubuntu-latest'
run: |
python -m cibuildwheel --output-dir dist
- name: Publish Linux Python wheels
if: matrix.runs-on == 'ubuntu-latest'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python3 -m twine upload dist/*linux*.whl