tgcrypto/.github/workflows/wheels.yml
2024-02-28 13:15:43 +00:00

56 lines
1.3 KiB
YAML

name: Build wheels
on:
workflow_dispatch: ~
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: pypa/cibuildwheel@v2.16.5
env:
CIBW_ARCHS_MACOS: "x86_64 universal2 arm64"
CIBW_TEST_REQUIRES: tox
CIBW_TEST_COMMAND: cd {project} && tox
CIBW_TEST_SKIP: "*-win*"
CIBW_BUILD_VERBOSITY: 1
- name: Store wheels
uses: actions/upload-artifact@v4
with:
name: dist-${{ matrix.os }}
path: ./wheelhouse/*.whl
upload_pypi:
name: Upload to pypi
runs-on: ubuntu-latest
needs:
- build_wheels
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
pattern: dist-*
merge-multiple: true
path: dist
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install Twine
run: |
pip install twine
- name: upload to pypi
run: twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}