Skip to content

Updated wheel release mechanism #2

Updated wheel release mechanism

Updated wheel release mechanism #2

Workflow file for this run

name: Master merge
# on:
# push:
# branches: [ master ]
# workflow_dispatch:
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build_linux:
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2014_x86_64
strategy:
fail-fast: false
max-parallel: 4
matrix:
python-version: ['cp38-cp38', 'cp39-cp39', 'cp310-cp310', 'cp311-cp311', 'cp312-cp312']
steps:
- name: add Python dir to path
run: |
echo "/opt/python/${{ matrix.python-version }}/bin" >> $GITHUB_PATH
- uses: actions/checkout@v3
with:
submodules: true
- name: Build for Python ${{ matrix.python-version }}
run: |
git config --global --add safe.directory '*'
python3 -V
python3 -m pip install -U pip
python3 -m pip install -U build twine wheel
python3 -m pip install -U -r requirements.txt
curl -Lo mkn https://github.com/mkn/mkn/releases/download/latest/mkn_manylinux
chmod +x mkn
PATH=$PWD:$PATH KLOG=3 ./sh/mkn.sh
python3 -m build
python3 -m twine check dist/*
rename 'linux_x86_64' 'manylinux_2_28_x86_64' dist/*.whl
- name: Make wheels universal
run: for wheel in $(ls dist/*.whl); do auditwheel repair $wheel; done
- name: Save packages as artifacts
uses: actions/upload-artifact@v3
with:
name: wheels
path: wheelhouse/*.whl
# - uses: actions/checkout@v3
# - uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}
# architecture: x64
# - env:
# TWINE_USERNAME: __token__
# TWINE_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }}
# run: |
# curl -Lo mkn https://github.com/mkn/mkn/releases/download/latest/mkn_nix
# chmod +x mkn
# PATH=$PWD:$PATH KLOG=3 ./sh/mkn.sh
# python3 -m pip install build twine pip --upgrade
# python3 -m build
# python3 -m twine check dist/*
# python3 -m twine upload --repository testpypi --skip-existing dist/*