Skip to content

Upload Python Package #25

Upload Python Package

Upload Python Package #25

Workflow file for this run

name: Upload Python Package
on:
release:
types: [created]
jobs:
publish-mac-windows:
strategy:
matrix:
python-version: ["3.6.x", "3.7.x", "3.8.x", "3.9.x", "3.10.x", "3.11.x", "3.12.x"]
os: [macos-latest, windows-latest]
exclude:
- os: macos-latest
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{matrix.python-version}}
architecture: ${{matrix.architecture}}
- name: Install Ninja
if: startsWith(matrix.os, 'macOS')
run: |
brew install ninja
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine ninja mypy pybind11
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py bdist_wheel
twine upload dist/*
publish-unix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine mypy pybind11
- name: build manylinux
uses: RalfG/[email protected]_x86_64
with:
system-packages: 'ninja-build'
- name: Publish manylinux
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
twine upload dist/*-manylinux*.whl
publish-source:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Install dependencies
run: |
sudo apt update -y
sudo apt install ninja-build -y
python -m pip install --upgrade pip
pip install setuptools wheel twine mypy pybind11
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist
twine upload dist/*.tar.gz