Skip to content

ci: upload fix

ci: upload fix #96

Workflow file for this run

name: Build and Tests (LINUX)
on:
pull_request:
push:
jobs:
build:
runs-on: ['ubuntu-latest']
container:
image: quay.io/pypa/manylinux_2_28_x86_64
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Download test image file
run: |
# Photo by Dillon Hunt (https://unsplash.com/@dillon_hunt) on https://unsplash.com/photos/an-aerial-view-of-the-ocean-and-rocks-zQLd8RXbenw
curl -L -o test_image.jpg "https://unsplash.com/photos/zQLd8RXbenw/download?ixid=M3wxMjA3fDB8MXx0b3BpY3x8NnNNVmpUTFNrZVF8fHx8fDJ8fDE3MzY0MDA3NTd8&force=true&w=2400"
- name: Setup, Build, Test and Audit
run: |
python_versions=("cp310" "cp311" "cp312" "cp313" "cp39")
for version in "${python_versions[@]}"; do
/opt/python/$version-$version/bin/pip install --upgrade pip setuptools rich wheel requests pillow
/opt/python/$version-$version/bin/python setup.py bdist_wheel
/opt/python/$version-$version/bin/pip install --find-links=dist materialyoucolor --no-index
/opt/python/$version-$version/bin/python tests/test_all.py test_image.jpg 1 &> /dev/null
if [ "$version" == "cp39" ]; then
/opt/python/$version-$version/bin/python setup.py sdist
/opt/python/$version-$version/bin/pip install auditwheel
mkdir wheelhouse
mv dist/*.tar.gz wheelhouse
auditwheel repair dist/*
echo "Built dists for Python $version:"
ls wheelhouse
fi
done
- name: Publish to PyPI
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
packages_dir: wheelhouse
skip-existing: true