Skip to content

Bump pypa/cibuildwheel from 2.14.1 to 2.15.0 #490

Bump pypa/cibuildwheel from 2.14.1 to 2.15.0

Bump pypa/cibuildwheel from 2.14.1 to 2.15.0 #490

Workflow file for this run

name: Build PyPop
on:
workflow_dispatch:
pull_request:
paths-ignore:
- '**.md'
- '**.rst'
- 'CITATION.cff'
- 'website/**'
- '.github/workflows/documentation.yaml'
- '.gitattributes'
push:
paths-ignore:
- '**.md'
- '**.rst'
- 'CITATION.cff'
- 'website/**'
- '.github/workflows/documentation.yaml'
- '.gitattributes'
release:
types:
- published
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macos-11, windows-2019]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build and test wheels
uses: pypa/cibuildwheel@v2.15.0
with:
package-dir: .
output-dir: wheelhouse
config-file: "{package}/pyproject.toml"
- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build sdist
run: pipx run build --sdist
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz
upload_gh_release:
name: Upload binary wheels and sdist to GH release page
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
# upload to gh 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'
steps:
- uses: actions/download-artifact@v3
with:
# unpacks default artifact into dist/
# if `name: artifact` is omitted, the action will create extra parent dir
name: artifact
path: dist
- uses: softprops/action-gh-release@v1
name: Uploading binaries to release page
with:
files: dist/*
upload_test_pypi:
name: Upload to test_pypi
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
environment: test_pypi
permissions:
id-token: write
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v3
with:
# unpacks default artifact into dist/
# if `name: artifact` is omitted, the action will create extra parent dir
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
with:
repository_url: https://test.pypi.org/legacy/