1060 update GitHub actions #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Deploy Python Lib" | |
on: | |
release: | |
types: | |
- created | |
pull_request: | |
permissions: | |
contents: read | |
pull-requests: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: | |
image: quay.io/pypa/manylinux2014_x86_64 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build c stuff | |
run: | | |
/opt/python/cp39-cp39/bin/python setup.py develop | |
/opt/python/cp310-cp310/bin/python setup.py develop | |
/opt/python/cp311-cp311/bin/python setup.py develop | |
/opt/python/cp312-cp312/bin/python setup.py develop | |
- name: Build wheel files | |
run: | | |
/opt/python/cp39-cp39/bin/python setup.py bdist_wheel | |
/opt/python/cp310-cp310/bin/python setup.py bdist_wheel | |
/opt/python/cp311-cp311/bin/python setup.py bdist_wheel | |
/opt/python/cp312-cp312/bin/python setup.py bdist_wheel | |
- name: Repair wheel files | |
run: | | |
/opt/python/cp39-cp39/bin/auditwheel repair dist/*cp39-cp39-linux_x86_64.whl | |
/opt/python/cp310-cp310/bin/auditwheel repair dist/*cp310-cp310-linux_x86_64.whl | |
/opt/python/cp311-cp311/bin/auditwheel repair dist/*cp311-cp311-linux_x86_64.whl | |
/opt/python/cp312-cp312/bin/auditwheel repair dist/*cp312-cp312-linux_x86_64.whl | |
- name: List contents of dist | |
run: ls -R dist | |
- name: List contests of wheelhouse | |
run: ls -R wheelhouse | |
- name: Archive build artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-artifacts-none-any | |
path: wheelhouse | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Install twine | |
run: | | |
pip install --upgrade pip | |
pip install twine | |
- name: Download build artifacts for windows and mac wheels | |
uses: actions/download-artifact@v4 | |
with: | |
path: dist | |
merge-multiple: true | |
- name: Download build artifacts for manylinux wheels | |
uses: actions/download-artifact@v4 | |
with: | |
path: wheelhouse | |
merge-multiple: true | |
- name: Inspect dist files | |
run: | | |
ls -R dist | |
- name: Inspect wheelhouse files | |
run: | | |
ls -R wheelhouse | |
- name: Merge wheel files | |
run: | | |
cp dist/* wheelhouse/ | |
ls -R wheelhouse | |
- name: Upload to PyPI using twine | |
run: | | |
twine upload --skip-existing wheelhouse/* | |
env: | |
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} |