Skip to content

Feat/sas validation #35

Feat/sas validation

Feat/sas validation #35

Workflow file for this run

name: Build and Publish Mac and Windows
on:
push:
branches:
- main
pull_request:
types:
- closed
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel
- name: Build wheel
run: |
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BUILD: cp38-*
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: wheels-${{ matrix.os }}
path: ./wheelhouse/*.whl
upload_wheels:
needs: build_wheels
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true || github.ref == 'refs/heads/main'
steps:
- name: Download wheels
uses: actions/download-artifact@v2
with:
name: wheels-windows-latest
path: dist/
- name: Download wheels
uses: actions/download-artifact@v2
with:
name: wheels-macos-latest
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: |
twine upload --skip-existing --repository-url https://upload.pypi.org/legacy/ dist/*.whl
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}