Skip to content

Release 0.43.7

Release 0.43.7 #17

Workflow file for this run

name: Packaging
on:
release:
types: [published]
workflow_dispatch:
env:
PROJECT: buvar
jobs:
package_sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: python -m pip install setuptools
- name: Build source distribution
run: |
python setup.py sdist
- name: archive artifacts
uses: actions/upload-artifact@v4
with:
name: buvar-sdist
retention-days: 1
path: |
./dist/${{ env.PROJECT }}-*.tar.gz
package_wheels:
strategy:
fail-fast: false
matrix:
platform:
- manylinux2014_x86_64
version:
- cp312-cp312
- cp311-cp311
- cp310-cp310
- cp39-cp39
- cp38-cp38
# - cp37-cp37m
runs-on: ubuntu-latest
container:
image: quay.io/pypa/manylinux2014_x86_64:latest
steps:
# XXX FIXME see checkout@v4 not working with container
# https://github.com/actions/checkout/issues/1487
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: build wheels
run: |
export PATH="/opt/python/${{ matrix.version }}/bin:${PATH}"
pip wheel -w ./wheelhouse cython pip
pip install -U cython pip -f ./wheelhouse
python setup.py bdist_wheel -d wheels
auditwheel repair ./wheels/${PROJECT}*${{ matrix.version }}*.whl \
--plat ${{ matrix.platform }} -w ./dist
pip install ./dist/${PROJECT}*${{ matrix.version }}*.whl
pip install "${PROJECT}[tests]" -f ./dist -f ./wheelhouse
pytest tests
- name: archive artifacts
uses: actions/upload-artifact@v3
with:
name: buvar-${{ matrix.version }}-${{ matrix.platform }}
retention-days: 1
path: |
./dist/${{ env.PROJECT }}-*${{ matrix.version }}*.whl
publish_sdist:
needs:
- package_sdist
- package_wheels
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/${{ env.PROJECT }} # Replace <package-name> with your PyPI project name
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- uses: actions/download-artifact@v4
with:
name: buvar-sdist
path: dist
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
publish_wheels:
needs:
- package_sdist
- package_wheels
environment:
name: pypi
url: https://pypi.org/p/${{ env.PROJECT }} # Replace <package-name> with your PyPI project name
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
strategy:
fail-fast: false
matrix:
platform:
- manylinux2014_x86_64
version:
- cp312-cp312
- cp311-cp311
- cp310-cp310
- cp39-cp39
- cp38-cp38
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: buvar-${{ matrix.version }}-${{ matrix.platform }}
path: dist
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1