use auditwheel #11
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: Build compiled package | |
on: | |
workflow_dispatch: | |
push: | |
tags: | |
- "compiled-v*" | |
branches: | |
- 'compiled-*' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ${{ matrix.builds.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
builds: [ | |
{os: "macos-latest"}, | |
{os: "windows-latest"}, | |
{os: "ubuntu-latest"} | |
] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Install deps | |
run: python -m pip install mypy[mypyc] wheel auditwheel twine | |
- name: Build wheels | |
run: | | |
python build.py package | |
auditwheel repair ./build/dist/*.whl | |
- name: Upload wheels | |
uses: actions/upload-artifact@v3 | |
with: | |
name: builds-${{ matrix.builds.os }} | |
path: ./build/dist/* | |
- name: Create GH release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
draft: true | |
files: ./build/dist/*.whl | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish on PyPI | |
if: startsWith(github.ref, 'refs/tags/') | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | |
run: | | |
twine upload --skip-existing ./build/dist/* |