v2.4.0 #7
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: pip-install | |
on: | |
release: | |
types: | |
- published | |
jobs: | |
build_wheels: | |
name: Build wheels on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python: ['3.7', '3.8', '3.9', '3.10', '3.11'] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- uses: actions/setup-python@v4 | |
name: Install Python | |
with: | |
python-version: ${{ matrix.python }} | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- name: Install cibuildwheel | |
run: | | |
python -m pip install cibuildwheel==2.12.1 | |
- name: Build wheels on Windows | |
if: runner.os == 'Windows' | |
run: python -m cibuildwheel --output-dir wheelhouse | |
env: | |
CIBW_BUILD: 'cp3?-win_amd64' | |
DISTUTILS_USE_SDK: 1 | |
MSSdk: 1 | |
- name: Build wheels on Mac and Linux | |
if: runner.os != 'Windows' | |
run: | | |
python -m cibuildwheel --output-dir wheelhouse | |
env: | |
CIBW_BUILD: 'cp3?-*' | |
CIBW_SKIP: '*-manylinux_i686' | |
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: ./wheelhouse/*.whl | |
build_sdist: | |
name: Build source distribution | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- uses: actions/setup-python@v3 | |
name: Install Python | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Build sdist | |
run: python setup.py sdist | |
- uses: actions/upload-artifact@v3 | |
with: | |
path: dist/*.tar.gz | |
upload_pypi: | |
needs: [build_wheels, build_sdist] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/download-artifact@v3 | |
with: | |
name: artifact | |
path: dist | |
# Only push to PyPI if we're on the public repo! | |
- uses: pypa/gh-action-pypi-publish@release/v1 | |
if: (!github.event.release.prerelease) && github.event_name == 'release' && github.event.action == 'published' && github.repository == 'VirtualPlanetaryLaboratory/vplanet' | |
with: | |
user: __token__ | |
password: ${{ secrets.pypi_password }} |