-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
23 additions
and
23 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI | ||
|
||
on: push | ||
name: Build | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python versions | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.12" | ||
jobs: | ||
build_wheels: | ||
name: Build wheels on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
# macos-13 is an intel runner, macos-14 is apple silicon | ||
os: [ubuntu-latest, ] # windows-latest, macos-13, macos-14] | ||
|
||
- name: Install cibuildwheel | ||
run: python -m pip install cibuildwheel==2.14.1 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Build wheels | ||
env: | ||
CIBW_BUILD: "cp312-* cp313-*" | ||
CIBW_SKIP: "pp*" | ||
CIBW_PLATFORM: "manylinux2014_x86_64" # Adjust if needed | ||
run: | | ||
python -m cibuildwheel --output-dir dist | ||
uses: pypa/[email protected] | ||
# env: | ||
# CIBW_SOME_OPTION: value | ||
# ... | ||
# with: | ||
# package-dir: . | ||
# output-dir: wheelhouse | ||
# config-file: "{package}/pyproject.toml" | ||
|
||
- name: Upload built wheels as artifact | ||
uses: actions/upload-artifact@v4 | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: built-wheels | ||
path: dist | ||
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | ||
path: ./wheelhouse/*.whl | ||
|
||
publish-to-pypi: | ||
name: >- | ||
|
@@ -49,7 +49,7 @@ jobs: | |
uses: actions/[email protected] | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
path: wheelhouse/ | ||
- name: Publish distribution 📦 to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
|
||
|