Merge pull request #1 from speckdavid/sprint2 #8
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: Deploy | |
on: push | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Build manylinux Python wheels | |
uses: RalfG/[email protected]_x86_64 | |
with: | |
python-versions: 'cp36-cp36m cp37-cp37m' | |
- uses: actions/upload-artifact@master | |
with: | |
name: linux-wheel | |
path: dist/*-manylinux*.whl | |
build-win-and-mac: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macOS-11, macOS-12, macos-13, windows-2022] | |
steps: | |
- uses: actions/checkout@v3 | |
# Used to host cibuildwheel | |
- uses: actions/setup-python@v3 | |
- name: Install cibuildwheel | |
run: python -m pip install cibuildwheel==2.11.2 | |
- name: Build wheels | |
run: python -m cibuildwheel --output-dir dist | |
# to supply options, put them in 'env', like: | |
# env: | |
# CIBW_SOME_OPTION: value | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: windows-mac-wheels | |
path: dist/*.whl | |
deploy-pypi: | |
runs-on: ubuntu-latest | |
needs: [build-linux, build-win-and-mac] | |
if: ${{ (github.repository == 'speckdavid/up-symk') && (github.ref == 'refs/heads/master') }} # We only deploy on the correct repo and branch | |
steps: | |
- uses: actions/download-artifact@master | |
with: | |
name: linux-wheel | |
path: dist | |
- uses: actions/download-artifact@master | |
with: | |
name: windows-mac-wheels | |
path: dist | |
- run: ls dist | |
- name: Upload to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
# user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} |