Update build_and_upload.yml #2
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
# .github/workflows/build_and_upload.yml | ||
name: Build and Upload to PyPI | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
jobs: | ||
build_wheels: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-22.04 | ||
- ubuntu-20.04 | ||
- ubuntu-18.04 | ||
- macos-12 | ||
- macos-11 | ||
- macos-10.15 | ||
- windows-2022 | ||
- windows-2019 | ||
- windows-2016 | ||
python-version: ["3.7"] | ||
architecture: [x64, arm64] # Add architectures | ||
# Limit arm64 to Ubuntu | ||
exclude: | ||
- os: macos-12 | ||
architecture: arm64 | ||
- os: macos-11 | ||
architecture: arm64 | ||
- os: macos-10.15 | ||
architecture: arm64 | ||
- os: windows-2022 | ||
architecture: arm64 | ||
- os: windows-2019 | ||
architecture: arm64 | ||
- os: windows-2016 | ||
architecture: arm64 | ||
steps: | ||
- uses: actions/checkout@v2 # Check out the repository code | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install cibuildwheel | ||
run: | | ||
pip install cibuildwheel | ||
- name: Build wheels with cibuildwheel | ||
run: | | ||
cibuildwheel --output-dir dist | ||
- name: Upload to PyPI | ||
uses: pypa/gh-action-pypi-publish@main | ||
with: | ||
password: ${{ secrets.pypi_password }} |