Skip to content

Commit

Permalink
Create build_and_upload.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
danyvarghese authored Nov 7, 2024
1 parent af2c256 commit 1a383b1
Showing 1 changed file with 63 additions and 0 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/build_and_upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# .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:
- 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 }}

0 comments on commit 1a383b1

Please sign in to comment.