Skip to content

BUILD: Reordered authors (only first authors appears on PyPI) #912

BUILD: Reordered authors (only first authors appears on PyPI)

BUILD: Reordered authors (only first authors appears on PyPI) #912

Workflow file for this run

name: Wheels
on:
push:
branches:
- '**'
tags:
- '**'
pull_request:
branches:
- '**'
jobs:
build_wheels:
name: Build wheel for ${{ matrix.python }}-${{ matrix.buildplat[1] }} ${{ matrix.buildplat[2] }}
runs-on: ${{ matrix.buildplat[0] }}
strategy:
matrix:
buildplat:
- [ubuntu-22.04, manylinux, x86_64]
# - [macos-10.15, macosx, x86_64]
# - [windows-2019, win, AMD64]
python: ["cp38", "cp39", "cp310", "cp311", "cp312"]
fail-fast: false
env:
IS_32_BIT: ${{ matrix.buildplat[2] == 'x86' }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Build wheels
uses: pypa/cibuildwheel@v2.19.1
env:
CIBW_BEFORE_ALL_LINUX: yum install -y hdf5 hdf5-devel netcdf netcdf-devel
CIBW_BUILD: ${{ matrix.python }}-${{ matrix.buildplat[1] }}*
CIBW_ARCHS: ${{ matrix.buildplat[2] }}
CIBW_ENVIRONMENT_PASS_LINUX: RUNNER_OS
CIBW_TEST_COMMAND: python -c 'import SurfaceTopography; print(SurfaceTopography.__version__)'
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
name: ${{ matrix.python }}-${{ matrix.buildplat[1] }}-${{ matrix.buildplat[2] }}
- name: Release wheels
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: wheelhouse/*.whl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check tag
id: check-tag
run: |
if [[ ${{ github.ref }} =~ ^refs/tags/[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo ::set-output name=match::true
fi
shell: bash
- name: Deploy to PyPI
if: steps.check-tag.outputs.match == 'true'
run: |
pip install twine
twine upload wheelhouse/*.whl
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
shell: bash