tgcrypto/.github/workflows/wheels.yml

56 lines
1.3 KiB
YAML
Raw Permalink Normal View History

2021-10-03 14:58:24 +00:00
name: Build wheels
2024-02-28 13:15:43 +00:00
on:
workflow_dispatch: ~
2021-10-03 14:58:24 +00:00
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
2024-02-28 13:15:43 +00:00
- uses: actions/checkout@v4
2021-10-03 14:58:24 +00:00
- name: Build wheels
2024-02-28 13:15:43 +00:00
uses: pypa/cibuildwheel@v2.16.5
2021-10-03 14:58:24 +00:00
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
2024-02-28 13:15:43 +00:00
uses: actions/upload-artifact@v4
2021-10-03 14:58:24 +00:00
with:
2024-02-28 13:15:43 +00:00
name: dist-${{ matrix.os }}
2021-10-03 14:58:24 +00:00
path: ./wheelhouse/*.whl
2024-02-28 13:15:43 +00:00
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 }}