Skip to content

ci: remove package_dir from config #3

ci: remove package_dir from config

ci: remove package_dir from config #3

Workflow file for this run

name: Publish
on:
workflow_dispatch:
push:
branches: [ 'main' ]
tags: [ 'v**' ]
pull_request:
branches: [ 'main' ]
schedule:
- cron: '30 12 * * 0'
jobs:
build_sdist:
name: Build sdist
runs-on: ubuntu-latest
defaults:
run:
working-directory: python
steps:
- uses: actions/checkout@v4
- name: Build
run: |
pipx run build --sdist
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: python/dist/*.tar.gz
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: python
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'windows-latest', 'macos-latest']
steps:
- uses: actions/checkout@v4
- name: Run cibuildwheel
uses: pypa/[email protected]
with:
package-dir: python
output-dir: python/wheelhouse
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: python/wheelhouse/*.whl
publish:
needs: [ 'build_sdist', 'build_wheels' ]
runs-on: ubuntu-latest
environment: pypi
permissions:
contents: write
id-token: write
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
defaults:
run:
working-directory: python
steps:
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1