Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 88 additions & 0 deletions .github/workflows/build_and_publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Build and Publish

on:
workflow_dispatch:
push:
tags:
- "v*"

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

env:
# ---- Linux ----
# Build manylinux + musllinux wheels
CIBW_ARCHS_LINUX: "x86_64"
CIBW_MANYLINUX_X86_64_IMAGE: "manylinux2014"
CIBW_MUSLLINUX_X86_64_IMAGE: "musllinux_1_2"

# ---- macOS ----
# Build Intel, Apple Silicon, and universal2 wheels
CIBW_ARCHS_MACOS: "x86_64 arm64 universal2"

# ---- Windows ----
# Build both 32-bit and 64-bit wheels
CIBW_ARCHS_WINDOWS: "AMD64 x86"

# ---- General settings ----
# Build wheels for CPython 3.11–3.13
CIBW_BUILD: "cp311-* cp312-* cp313-*"

# If needed, skip PyPy or unsupported combos
CIBW_SKIP: "pp* *-manylinux_i686"

# Output
CIBW_OUTPUT_DIR: "wheelhouse"

steps:
- uses: actions/checkout@v4

- name: Install cibuildwheel
run: pip install cibuildwheel==2.22.0

- name: Build wheels
run: cibuildwheel

- name: Upload wheels as artifacts
uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.os }}
path: wheelhouse/*.whl

build_sdist:
name: Build sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build sdist
run: |
pip install build
python -m build --sdist

- uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/*.tar.gz

publish:
name: Publish to PyPI
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4

- name: Install Twine
run: pip install twine

- name: Publish to PyPI
run: |
twine upload wheels-*/* sdist/*
env:
TWINE_USERNAME: "__token__"
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
32 changes: 23 additions & 9 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ name: Build wheels

on:
workflow_dispatch:
push:
tags:
- "v*"

jobs:
build_wheels:
Expand All @@ -15,21 +12,38 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]

env:
# ---- Linux ----
# Build manylinux + musllinux wheels
CIBW_ARCHS_LINUX: "x86_64"
CIBW_MANYLINUX_X86_64_IMAGE: "manylinux2014"
CIBW_MUSLLINUX_X86_64_IMAGE: "musllinux_1_2"

# ---- macOS ----
# Build Intel, Apple Silicon, and universal2 wheels
CIBW_ARCHS_MACOS: "x86_64 arm64 universal2"

# ---- Windows ----
# Build both 32-bit and 64-bit wheels
CIBW_ARCHS_WINDOWS: "AMD64 x86"

# ---- General settings ----
# Build wheels for CPython 3.11–3.13
CIBW_BUILD: "cp311-* cp312-* cp313-*"

# If needed, skip PyPy or unsupported combos
CIBW_SKIP: "pp* *-manylinux_i686"

# Output
CIBW_OUTPUT_DIR: "wheelhouse"

steps:
- uses: actions/checkout@v4

- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install cibuildwheel
run: pip install cibuildwheel==2.22.0

- name: Build wheels
run: cibuildwheel --output-dir wheelhouse
run: cibuildwheel

- name: Upload wheels as artifacts
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<p align="center">
<img src=".github/assets/logo.svg" alt="ErrorAlign Logo" width="100%"/>
<img src="https://raw.githubusercontent.com/corticph/error-align/refs/heads/main/.github/assets/logo.svg" alt="ErrorAlign Logo" width="100%"/>
</p>

<p align="center">
Expand Down