Skip to content

Bump pypa/cibuildwheel from 2.23.0 to 2.23.1 #440

Bump pypa/cibuildwheel from 2.23.0 to 2.23.1

Bump pypa/cibuildwheel from 2.23.0 to 2.23.1 #440

Workflow file for this run

name: Build wheels
on:
push:
branches:
- main
tags:
- v*
pull_request:
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-13, macos-14]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
persist-credentials: false
- name: Build wheels
uses: pypa/cibuildwheel@v2.23.1
# (here: set these in pyproject.toml to the extent possible)
# env:
# CIBW_SOME_OPTION: value
# CIBW_BUILD_VERBOSITY: 1
# VERBOSE: 1
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Build sdist
run: |
pipx --version
pipx run build --sdist
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
upload_pypi:
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
# upload to PyPI on every tag starting with 'v'
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
# alternatively, to publish when a GitHub Release is created, use the following rule:
# if: github.event_name == 'release' && github.event.action == 'published'
environment:
name: pypi
url: https://pypi.org/p/islpy
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@v1.12.4
# with:
# user: __token__
# password: ${{ secrets.pypi_password }}
# To test: repository_url: https://test.pypi.org/legacy/
upload_testpypi:
if: startsWith(github.ref, 'refs/tags/testv')
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
environment:
name: testpypi
url: https://test.pypi.org/p/islpy
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist/
merge-multiple: true
- name: Publish distribution 📦 to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/