-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
44 additions
and
61 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,84 +3,67 @@ name: Deploy | |
on: push | ||
|
||
jobs: | ||
build-win: | ||
name: Build wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [windows-2022] | ||
build-linux: | ||
name: Build linux Python wheels | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v1 | ||
- name: Build manylinux Python wheels | ||
uses: RalfG/python[email protected]_x86_64 | ||
with: | ||
python-version: "3.10" | ||
python-versions: 'cp36-cp36m cp37-cp37m' | ||
|
||
- uses: actions/upload-artifact@master | ||
with: | ||
name: linux-wheels | ||
path: dist/*-manylinux*.whl | ||
|
||
|
||
build-windows: | ||
name: Build windows Python wheel | ||
runs-on: windows-2022 | ||
|
||
steps: | ||
- uses: actions/setup-python@v3 | ||
|
||
- name: Install cibuildwheel | ||
run: python -m pip install cibuildwheel==2.12.1 | ||
run: python -m pip install cibuildwheel==2.15.0 | ||
|
||
- name: Build wheels | ||
- uses: ilammy/msvc-dev-cmd@v1 | ||
|
||
- name: Build 64-bit wheel | ||
run: python -m cibuildwheel --output-dir dist | ||
env: | ||
CIBW_BUILD: cp36-win_amd64 | ||
|
||
- uses: actions/upload-artifact@v3 | ||
with: | ||
name: windows-wheels | ||
name: windows-wheel | ||
path: dist/*.whl | ||
|
||
build-linux: | ||
deploy-pypi: | ||
runs-on: ubuntu-latest | ||
needs: [build-linux, build-win] | ||
if: github.ref == 'refs/heads/main' # We only deploy on master commits | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@master | ||
|
||
- name: Build manylinux Python wheels | ||
uses: RalfG/[email protected]_x86_64 | ||
- uses: actions/download-artifact@master | ||
with: | ||
python-versions: 'cp37-cp37m cp38-cp38 cp39-cp39 cp310-cp310 cp311-cp31 cp312-cp312' | ||
name: linux-wheels | ||
path: dist | ||
|
||
- uses: actions/upload-artifact@master | ||
- uses: actions/download-artifact@master | ||
with: | ||
name: linux-wheel | ||
path: dist/*-manylinux*.whl | ||
name: windows-wheel | ||
path: dist | ||
|
||
deploy-pypi: | ||
runs-on: ubuntu-latest | ||
needs: [build-linux, build-win] | ||
if: github.ref == 'refs/heads/master' # We only deploy on master commits | ||
|
||
steps: | ||
- name: Checkout repo | ||
uses: actions/checkout@master | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.7 | ||
|
||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.8 | ||
|
||
- uses: actions/download-artifact@master | ||
with: | ||
name: linux-wheel | ||
path: dist | ||
|
||
- uses: actions/download-artifact@master | ||
with: | ||
name: windows-wheels | ||
path: dist | ||
|
||
- run: ls dist | ||
|
||
- name: Upload to PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
- run: ls dist | ||
|
||
- name: Upload to PyPI | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_API_TOKEN }} |