Skip to content

Add newline at end of file #248

Add newline at end of file

Add newline at end of file #248

Workflow file for this run

name: Build Python Windows wheels
on:
push:
branches:
- master
create:
jobs:
build_windows:
runs-on: windows-latest
strategy:
max-parallel: 5
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
include:
- python-version: '3.8'
py-short: '38'
py-short2: '38'
- python-version: '3.9'
py-short: '39'
py-short2: '39'
- python-version: '3.10'
py-short: '310'
py-short2: '310'
- python-version: '3.11'
py-short: 311
py-short2: 311
- python-version: '3.12'
py-short: 312
py-short2: 312
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache mecab
id: cache-mecab
uses: actions/cache@v4
with:
path: C:/mecab
key: mecab-win-build
- name: Download MeCab Win and Unzip it
if: steps.cache-mecab.outputs.cache-hit != 'true'
shell: bash
run: |
curl -LO "https://github.com/chezou/mecab/releases/download/mecab-0.996-msvc-5/mecab-msvc-x64.zip"
unzip -o "mecab-msvc-x64.zip" -d c:/mecab
- name: Install dependencies
run: |
python -m pip install --upgrade setuptools wheel pip setuptools-scm
pip install -r requirements.txt
- name: Build wheel
run: |
python setup.py bdist_wheel
- name: Upload Wheel
uses: actions/upload-artifact@v4
with:
name: win-wheels-${{ matrix.python-version }}
path: dist
- name: Check wheels
shell: bash
run: |
ls -la
VERSION=$(python setup.py --version)
pip install "dist/fugashi-${VERSION}-cp${{ matrix.py-short }}-cp${{ matrix.py-short2 }}-win_amd64.whl"
- name: Publish to PyPI if tagged
if: startsWith(github.ref, 'refs/tags')
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
shell: bash
run: |
pip install twine
twine upload dist/fugashi*