Skip to content

Merge branch 'develop' of github.com:n5-suzuki/pyopenjtalk #35

Merge branch 'develop' of github.com:n5-suzuki/pyopenjtalk

Merge branch 'develop' of github.com:n5-suzuki/pyopenjtalk #35

Workflow file for this run

# ref: https://github.com/tsukumijima/pyworld-prebuilt/blob/master/.github/workflows/build-wheels.yml
name: Deploy to PyPI
on:
push:
branches: [ master ]
workflow_dispatch:
inputs:
publish_testpypi:
type: boolean
required: true
description: 'Publish to Test PyPI'
publish_pypi:
type: boolean
required: true
description: 'Publish to PyPI (Production)'
jobs:
build_wheels:
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
name: Build Wheels on ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Setup QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: arm64
- name: Build Wheels
uses: pypa/cibuildwheel@v2.19.2
env:
CIBW_ARCHS_LINUX: auto aarch64
CIBW_ARCHS_MACOS: x86_64 universal2 arm64
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.8"
CIBW_SKIP: pp* *musllinux*
- name: Upload Wheels to artifact
uses: actions/upload-artifact@v4
with:
name: cibuildwheel-wheels-${{ runner.os }}
path: wheelhouse
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Build sdist
run: pipx run build --sdist
- uses: actions/upload-artifact@v4
with:
name: cibuildwheel-sdist
path: dist/*.tar.gz
publish_wheels:
runs-on: ubuntu-latest
needs: [build_wheels, build_sdist]
name: Publish Wheels
steps:
- name: Download Wheels from artifact
uses: actions/download-artifact@v4
with:
pattern: cibuildwheel-*
path: wheelhouse
merge-multiple: true
- name: Publish Wheels to Test PyPI
if: ${{ github.event.inputs.publish_testpypi == 'true' }}
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.inputs.publish_pypi == 'true' }}
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: wheelhouse
password: ${{ secrets.PYPI_API_TOKEN }}