Refactor printcore.py #338
Workflow file for this run
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
name: Build Windows Python package | |
on: | |
push: | |
pull_request: | |
release: | |
types: | |
- created | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [windows-latest] | |
architecture: [x64, x86] | |
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
architecture: ${{ matrix.architecture }} | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip setuptools wheel twine cython | |
- name: Build Python wheel | |
run: | | |
python setup.py bdist_wheel | |
- name: Upload artifacts for inspection | |
uses: actions/upload-artifact@v3 | |
with: | |
name: wheel_${{ matrix.os }}_${{ matrix.architecture }}_${{ matrix.python-version }} | |
path: dist/*.whl | |
- name: Publish sdists and wheels to PyPI | |
if: ${{ success() && github.event_name == 'release' && github.event.action == 'created' }} | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_API_KEY }} | |
run: | | |
twine upload dist/* |