Skip to content

build-wheels

build-wheels #14

Workflow file for this run

name: build-wheels
on:
workflow_dispatch:
inputs:
release_pipy:
description: Do you want to release to pipy
required: true
default: "false"
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-latest]
steps:
- uses: actions/checkout@v4
# Used to host cibuildwheel
- uses: actions/setup-python@v3
- name: set test version
run: |
rm setup.py
ln -s setup_pypi_test.py setup.py
# - name: Set up QEMU
# if: runner.os == 'Linux'
# uses: docker/setup-qemu-action@v3
# with:
# platforms: all
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.16.0
# - name: Build wheels
# uses: pypa/cibuildwheel@v2.16.0
# env:
# # configure cibuildwheel to build native archs ('auto'), and some
# # emulated ones
# CIBW_ARCHS_LINUX: auto aarch64 ppc64le s390x
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
# to supply options, put them in 'env', like:
env:
CIBW_ARCHS_MACOS: "x86_64 arm64"
# CIBW_ARCHS_LINUX: "auto aarch64"
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
publish-pypitest:
needs: build_wheels
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
path: ./wheelhouse/
- name: show all artifact
run: |
ls -al ./wheelhouse/artifact/
- name: Publish package to pypitest
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.EELIUTEST }}
packages_dir: ./wheelhouse/artifact
repository_url: https://test.pypi.org/legacy/
publish-pypi:
needs: build_wheels
runs-on: ubuntu-latest
if: ${{ github.event.inputs.release_pipy }} == "true"
steps:
- uses: actions/download-artifact@v3
with:
path: ./wheelhouse/
- name: show all artifact
run: |
ls -al ./wheelhouse/artifact/
- name: Publish package to pypitest
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PINPOINTPY }}
packages_dir: ./wheelhouse/artifact
repository_url: https://test.pypi.org/legacy/