Release v0.12.3 #24
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
# ref: https://github.com/msgpack/msgpack-python/blob/main/.github/workflows/wheel.yml | |
name: Build Wheels | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
build_wheels: | |
strategy: | |
matrix: | |
os: [windows-2022, macos-11, ubuntu-22.04] | |
runs-on: ${{ matrix.os }} | |
name: Build Wheels on ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup QEMU | |
if: runner.os == 'Linux' | |
uses: docker/setup-qemu-action@v3 | |
with: | |
platforms: arm64 | |
- name: Build | |
uses: pypa/cibuildwheel@v2.19.0 | |
env: | |
CIBW_ARCHS_LINUX: auto aarch64 | |
CIBW_ARCHS_MACOS: x86_64 universal2 arm64 | |
CIBW_SKIP: pp* | |
- name: Upload Wheels to artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Wheels | |
path: wheelhouse | |
publish_wheels: | |
runs-on: ubuntu-22.04 | |
needs: build_wheels | |
name: Publish Wheels | |
steps: | |
- name: Download Wheels from artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: Wheels | |
path: wheelhouse | |
- name: Publish Wheels to Test PyPI | |
if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags')) == false | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: wheelhouse | |
password: ${{ secrets.TEST_PYPI_API_TOKEN }} | |
repository-url: https://test.pypi.org/legacy/ | |
- name: Publish Wheels to PyPI | |
if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags')) == true | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
packages-dir: wheelhouse | |
password: ${{ secrets.PYPI_API_TOKEN }} |