Skip to content

Merge pull request #18 from yusuf-jkhan1/feat/validator_cleanup #95

Merge pull request #18 from yusuf-jkhan1/feat/validator_cleanup

Merge pull request #18 from yusuf-jkhan1/feat/validator_cleanup #95

Workflow file for this run

name: Build and Publish Universal Wheel
on:
push:
branches:
- main
- develop
pull_request:
types:
- closed
jobs:
build_wheels:
name: Build universal wheel
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Build wheel
run: |
python -m pip install wheel # Ensure wheel is installed
python setup.py bdist_wheel --universal
mkdir -p wheelhouse
mv dist/*.whl wheelhouse/
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: wheels
path: ./wheelhouse/*.whl
upload_wheels:
needs: build_wheels
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop'
steps:
- name: Download wheels
uses: actions/download-artifact@v4
with:
name: wheels
path: dist/
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install twine
run: python -m pip install twine
- name: Publish wheels to PyPI
run: |
if [ "${{ github.ref }}" = "refs/heads/develop" ]; then
twine upload --skip-existing --repository-url https://test.pypi.org/legacy/ dist/*.whl
else
twine upload --skip-existing --repository-url https://upload.pypi.org/legacy/ dist/*.whl
fi
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN_AZPYPE }}