Skip to content

Create build_and_upload.yml #1

Create build_and_upload.yml

Create build_and_upload.yml #1

# .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", "3.8", "3.9", "3.10"]
architecture: [x64, arm64] # Add architectures
# Limit arm64 to Ubuntu
exclude:

Check failure on line 30 in .github/workflows/build_and_upload.yml

View workflow run for this annotation

GitHub Actions / Build and Upload to PyPI

Invalid workflow file

The workflow is not valid. .github/workflows/build_and_upload.yml (Line: 30, Col: 7): Unexpected value '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 }}