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
# This workflow will upload a Python Package using Twine when a release is created | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries | |
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
name: Build wheels and sdist and upload to PyPI | |
on: | |
release: | |
types: [published] | |
permissions: | |
contents: read | |
jobs: | |
build_linux_wheels: | |
name: Build wheels on standard linux | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build wheels | |
uses: pypa/[email protected] | |
env: | |
CIBW_BUILD: "*manylinux*" | |
CIBW_SKIP: cp36* pp* | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl | |
build_musl_wheels: | |
name: Build wheels on musl linux | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build wheels | |
uses: pypa/[email protected] | |
env: | |
CIBW_BUILD: "*musllinux*" | |
CIBW_SKIP: cp36* pp* | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl | |
build_macosx_wheels: | |
name: Build wheels on macosx | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build wheels | |
uses: pypa/[email protected] | |
env: | |
CIBW_BUILD: "*macosx*" | |
CIBW_SKIP: cp36* pp* | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl | |
build_sdist: | |
name: Build sdist and upload to PyPI | |
needs: [build_linux_wheels, build_musl_wheels, build_macosx_wheels] | |
# Just need to build sdist on a single machine | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Install dependencies | |
run: | | |
python -m pip install -U pip | |
pip install -U numpy setuptools | |
pip install -U . | |
- name: Download wheels | |
uses: actions/[email protected] | |
with: | |
path: ./wheels | |
- name: Build sdist | |
run: | | |
python setup.py sdist | |
ls -l dist | |
tar tvfz dist/yet_another_wizz-*.tar.gz | |
- name: Copy wheels | |
run: | | |
echo ls -l wheels | |
ls -l wheels | |
echo ls -l wheels/artifact | |
ls -l wheels/artifact | |
cp wheels/artifact/*.whl dist | |
echo ls -l dist | |
ls -l dist | |
- name: Publish package | |
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} |