Skip to content

Update .readthedocs.yml #157

Update .readthedocs.yml

Update .readthedocs.yml #157

Workflow file for this run

name: Build
on:
push:
tags:
- v*
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
CIBW_ARCHS_MACOS: "x86_64 arm64"
strategy:
matrix:
os: [ubuntu-20.04, macos-11]
cibw_archs: [auto64]
include:
- os: ubuntu-20.04
cibw_archs: aarch64
steps:
- name: Set up QEMU
if: matrix.cibw_archs == 'aarch64'
uses: docker/setup-qemu-action@v2
with:
platforms: arm64
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS: ${{ matrix.cibw_archs }}
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
build_windows_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
MECAB_PATH: "C:\\mecab"
strategy:
matrix:
os: [windows-2019]
arch: [x86, AMD64, ARM64]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: >
python scripts/repair_wheel_windows.py
--verbose
--architecture=${{ matrix.arch }}
--add-path=${{ env.MECAB_PATH }}
--wheel-dir {dest_dir}
{wheel}
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build sdist
run: pipx run build --sdist
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz
upload_pypi:
needs: [build_wheels, build_windows_wheels, build_sdist]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
# unpacks default artifact into dist/
# if `name: artifact` is omitted, the action will create extra parent dir
name: artifact
path: dist
- uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.pypi_password }}
skip-existing: true
upload_release:
needs: [build_wheels, build_windows_wheels, build_sdist]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
# unpacks default artifact into dist/
# if `name: artifact` is omitted, the action will create extra parent dir
name: artifact
path: dist
- name: Release
uses: softprops/action-gh-release@v1
with:
files: dist/*