Traits 6.4.2 #11
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release to PyPI | |
on: | |
workflow_dispatch: | |
release: | |
types: [published] | |
jobs: | |
build-wheels: | |
strategy: | |
matrix: | |
os: [windows-latest, macos-latest, ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Check out the release commit | |
uses: actions/checkout@v3 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
with: | |
platforms: arm64 | |
if: runner.os == 'Linux' | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
- name: Install Python packages needed for wheel build and upload | |
run: | | |
python -m pip install --upgrade pip setuptools | |
python -m pip install twine wheel | |
- name: Build wheels | |
uses: pypa/[email protected] | |
env: | |
CIBW_SKIP: 'pp*' | |
CIBW_ARCHS_LINUX: "auto aarch64" | |
CIBW_ARCHS_MACOS: "auto universal2" | |
- name: Check and upload wheels | |
env: | |
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
run: | | |
python -m twine check --strict wheelhouse/*.whl | |
python -m twine upload wheelhouse/*.whl | |
build-sdist: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the release commit | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
- name: Install Python packages needed for sdist build and upload | |
run: | | |
python -m pip install --upgrade pip setuptools | |
python -m pip install twine | |
- name: Build sdist | |
run: | | |
python setup.py sdist | |
- name: Publish sdist to PyPI | |
env: | |
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
run: | | |
python -m twine check --strict dist/*.tar.gz | |
python -m twine upload dist/*.tar.gz |