Skip to content

Build wheels with cibuildwheel #447

Build wheels with cibuildwheel

Build wheels with cibuildwheel #447

Workflow file for this run

name: PyCOLMAP build and publish
on:
push:
branches:
- master
pull_request:
types: [ assigned, opened, synchronize, reopened ]
release:
types: [ published, edited ]
workflow_dispatch:
jobs:
build:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest] #, macos-12, macos-13]
steps:
- uses: actions/checkout@v4
- name: Build wheels
uses: pypa/[email protected]
- name: Archive wheels
uses: actions/upload-artifact@v3
with:
name: pycolmap-${{ matrix.os }}
path: wheelhouse/pycolmap-*.whl
pypi-publish:
name: Publish wheels to PyPI
needs: build
runs-on: ubuntu-latest
# We publish the wheel to pypi when a new tag is pushed,
# either by creating a new GitHub release or explictly with `git tag`
if: ${{ github.event_name == 'release' || startsWith(github.ref, 'refs/tags') }}
steps:
- name: Download wheels
uses: actions/download-artifact@v3
with:
path: ./artifacts/
- name: Move wheels
run: mkdir ./wheelhouse && mv ./artifacts/**/*.whl ./wheelhouse/
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip_existing: true
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: ./wheelhouse/