Skip to content

Commit

Permalink
remove cibuildwheel
Browse files Browse the repository at this point in the history
  • Loading branch information
wasade committed Feb 14, 2025
1 parent adaeedc commit a424a02
Showing 1 changed file with 21 additions and 48 deletions.
69 changes: 21 additions & 48 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,62 +1,35 @@
# derived from https://github.com/pypa/cibuildwheel/blob/main/examples/github-deploy.yml
# derived from https://github.com/biocore/biom-format/blob/master/.github/workflows/release.yml
name: Build and upload to PyPI

on:
push:
tags:
- "*"

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}-py${{ matrix.python_version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
# macos-13 is an intel runner, macos-14 is apple silicon
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
python_version: [3.9, 3.10, 3.11, 3.12]

steps:
- uses: actions/checkout@v4

- name: Build wheels
uses: pypa/[email protected]

- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ matrix.python_version }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
env:
earliest_python: "3.9"
latest_python: "3.12"
miniforge_version: "23.11.0-0"
miniforge_variant: "Mambaforge"

- name: Build sdist
run: pipx run build --sdist

- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz

upload_pypi:
needs: [build_wheels, build_sdist]
jobs:
release:
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/download-artifact@v4
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
# unpacks all CIBW artifacts into dist/
pattern: cibw-*
path: dist
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@release/v1
python-version: 3.8
- name: Build distribution
run: |
# set version from '${{ github.ref_name }}'
export RELEASE_VERSION=${{ github.ref_name }}
python setup.py sdist
- name: Publish a Python distribution to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit a424a02

Please sign in to comment.