Refactor publish.yml for matrix configuration
updating and fixing pypy documentation
This commit is contained in:
15
.github/workflows/publish.yml
vendored
15
.github/workflows/publish.yml
vendored
@@ -21,8 +21,10 @@ jobs:
|
|||||||
python: '3.12'
|
python: '3.12'
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
target: x86_64
|
target: x86_64
|
||||||
|
python: '3.12'
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
target: x86_64
|
target: x86_64
|
||||||
|
python: '3.12'
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@@ -30,7 +32,7 @@ jobs:
|
|||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.12' # Target a modern Python version
|
python-version: ${{ matrix.python }}
|
||||||
|
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
@@ -40,17 +42,15 @@ jobs:
|
|||||||
- name: Build wheels with Maturin
|
- name: Build wheels with Maturin
|
||||||
uses: PyO3/maturin-action@v1
|
uses: PyO3/maturin-action@v1
|
||||||
with:
|
with:
|
||||||
# Use the target from the matrix (x86_64)
|
|
||||||
target: ${{ matrix.target }}
|
target: ${{ matrix.target }}
|
||||||
# Build a manylinux-compatible wheel for Linux/Colab users
|
python: ${{ matrix.python }}
|
||||||
# manylinux: auto
|
|
||||||
command: build
|
command: build
|
||||||
args: --release --out dist --find-interpreter
|
args: --release --out dist --find-interpreter
|
||||||
|
|
||||||
- name: Upload built wheels as Artifact
|
- name: Upload built wheels as Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: wheels-${{ matrix.os }}-${{ matrix.target }}
|
name: wheels-${{ matrix.os }}-${{ matrix.target }}
|
||||||
path: dist
|
path: dist
|
||||||
|
|
||||||
publish:
|
publish:
|
||||||
@@ -63,14 +63,13 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: wheels
|
|
||||||
path: dist
|
path: dist
|
||||||
|
pattern: wheels-*
|
||||||
|
merge-multiple: true
|
||||||
|
|
||||||
- name: Publish to PyPI
|
- name: Publish to PyPI
|
||||||
uses: PyO3/maturin-action@v1
|
uses: PyO3/maturin-action@v1
|
||||||
with:
|
with:
|
||||||
# Use the secret we configured on GitHub
|
|
||||||
pypi-token: ${{ secrets.PYPI_API_TOKEN }}
|
pypi-token: ${{ secrets.PYPI_API_TOKEN }}
|
||||||
# Command to upload all wheels in the 'dist' directory
|
|
||||||
command: upload
|
command: upload
|
||||||
args: --skip-existing --non-interactive
|
args: --skip-existing --non-interactive
|
||||||
|
|||||||
Reference in New Issue
Block a user