Added compiled wheel push to pypi in github actions, added another jo… #16
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
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
# GitHub recommends pinning actions to a commit SHA. | ||
# To get a newer version, you will need to update the SHA. | ||
# You can also reference a tag or branch, but the action may change without warning. | ||
name: Upload Python Package to PyPI | ||
on: | ||
release: | ||
types: [published] | ||
jobs: | ||
deploy-compiled-for-windows: | ||
# runs-on: windows-latest | ||
runs-on: ${{ matrix.builds.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
builds: [ | ||
{ os: "windows-latest", python_requires: ">=3.10.0" }, | ||
] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install setuptools wheel twine==4.0.1 cibuildwheel==2.9.0 | ||
- name: Build wheels | ||
env: | ||
CIBW_PROJECT_REQUIRES_PYTHON: ${{ matrix.builds.python_requires }} | ||
CIBW_BUILD: "cp3*" | ||
run: | | ||
python -m cibuildwheel --output-dir wheelhouse | ||
- name: Publish to PyPI | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{secrets.PYPI_API_TOKEN}} | ||
run: | | ||
# python setup.py sdist bdist_wheel | ||
# twine upload dist/* | ||
twine upload --skip-existing wheelhouse/* | ||
pure-python-wheel-publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.10 | ||
- name: Install deps | ||
run: | | ||
python -m pip install wheel==0.37.1 twine==4.0.1 | ||
- name: Build pure python wheel | ||
env: | ||
KESSLER_SKIP_COMPILE: "1" | ||
run: pip wheel -w wheelhouse . | ||
- name: Publish | ||
env: | ||
TWINE_USERNAME: __token__ | ||
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | ||
run: | | ||
twine upload --skip-existing wheelhouse/* |