Skip to content

Merge pull request #5 from KernelA/fix-build #27

Merge pull request #5 from KernelA/fix-build

Merge pull request #5 from KernelA/fix-build #27

name: Python package
permissions:
id-token: write
contents: write
on:
push:
branches:
- master
- develop
pull_request:
branches:
- develop
- master
jobs:
build:
strategy:
fail-fast: false
matrix:
python-version: ["3.9"]
os: ["ubuntu-20.04", "windows-2019", "macos-11"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: 'requirements.*.txt'
- name: Install dependencies
run: pip install -r ./requirements.dev.txt
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
- name: Upload to PyPi
if: ${{ github.ref_name == 'master' }}
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_SECRET }}
run: twine upload --skip-existing --non-interactive ./wheelhouse/*.whl
release:
runs-on: "ubuntu-latest"
needs: build
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.head_ref || github.ref_name }}
- name: Python Semantic Release
uses: python-semantic-release/python-semantic-release@v8.0.7
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
root_options: "-v"
changelog: false