Add swap_axes
argument(s) to conversion functions for WKTs (#14)
#14
Workflow file for this run
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
name: Publish | |
on: | |
push: | |
tags: | |
- "[0-9]+.[0-9]+.[0-9]+" | |
permissions: | |
contents: read | |
jobs: | |
# region Publish Snapr | |
publish-snapr: | |
name: Publish - `crates.io` | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Setup Rust Toolchain - Stable | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: stable | |
cache: true | |
- name: Publish - `crates.io` | |
env: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} | |
run: | | |
cargo publish --all-features --verbose -p snapr | |
# region Upload Linux Wheels | |
upload-linux-wheels: | |
strategy: | |
matrix: | |
include: | |
- identifier: x86_64 | |
target: x86_64 | |
- identifier: x86 | |
target: x86 | |
- identifier: ARM64 | |
target: aarch64 | |
name: Upload Wheels - Linux - ${{ matrix.identifier }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.x | |
- name: Build Wheels | |
uses: PyO3/maturin-action@v1 | |
with: | |
args: --release --out dist --find-interpreter | |
manylinux: auto | |
sccache: "true" | |
target: ${{ matrix.target }} | |
working-directory: snapr-py | |
- name: Upload Wheels - `${{matrix.identifier}}` | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-linux-${{ matrix.target }} | |
path: snapr-py/dist | |
# region Upload Musl Wheels | |
upload-musl-wheels: | |
strategy: | |
matrix: | |
include: | |
- identifier: x86_64 | |
target: x86_64 | |
- identifier: x86 | |
target: x86 | |
- identifier: ARM64 | |
target: aarch64 | |
name: Upload Wheels - Musl - ${{ matrix.identifier }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.x | |
- name: Build Wheels | |
uses: PyO3/maturin-action@v1 | |
with: | |
args: --release --out dist --find-interpreter | |
manylinux: musllinux_1_2 | |
sccache: "true" | |
target: ${{ matrix.target }} | |
working-directory: snapr-py | |
- name: Upload Wheels - `${{matrix.identifier}}` | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-musl-${{ matrix.target }} | |
path: snapr-py/dist | |
# region Upload Windows Wheels | |
upload-windows-wheels: | |
strategy: | |
matrix: | |
include: | |
- identifier: x64 | |
target: x64 | |
- identifier: x86 | |
target: x86 | |
name: Upload Wheels - Windows - ${{ matrix.identifier }} | |
runs-on: windows-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
architecture: ${{ matrix.target }} | |
python-version: 3.x | |
- name: Build Wheels | |
uses: PyO3/maturin-action@v1 | |
with: | |
args: --release --out dist --find-interpreter | |
sccache: "true" | |
target: ${{ matrix.target }} | |
working-directory: snapr-py | |
- name: Upload Wheels - `${{matrix.identifier}}` | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-windows-${{ matrix.target }} | |
path: snapr-py/dist | |
# region Upload MacOS Wheels | |
upload-macos-wheels: | |
strategy: | |
matrix: | |
include: | |
- identifier: x86_64 | |
os: macos-12 | |
target: x86_64 | |
- identifier: ARM64 | |
os: macos-14 | |
target: aarch64 | |
name: Upload Wheels - MacOS - ${{ matrix.identifier }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.x | |
- name: Build Wheels | |
uses: PyO3/maturin-action@v1 | |
with: | |
args: --release --out dist --find-interpreter | |
sccache: "true" | |
target: ${{ matrix.target }} | |
working-directory: snapr-py | |
- name: Upload Wheels - `${{matrix.identifier}}` | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-macos-${{ matrix.target }} | |
path: snapr-py/dist | |
# region Upload Source Distribution | |
upload-source-distribution: | |
name: Upload Source Distribution | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Build Source Distribution | |
uses: PyO3/maturin-action@v1 | |
with: | |
args: --out dist | |
command: sdist | |
working-directory: snapr-py | |
- name: Upload Source Distribution | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wheels-sdist | |
path: snapr-py/dist | |
# region Publish Snapr.py | |
publish-snapr-py: | |
name: Publish - `pypi.org` | |
runs-on: ubuntu-latest | |
needs: | |
- upload-linux-wheels | |
- upload-macos-wheels | |
- upload-musl-wheels | |
- upload-source-distribution | |
- upload-windows-wheels | |
permissions: | |
id-token: write | |
contents: write | |
attestations: write | |
steps: | |
- name: Download Artifacts | |
uses: actions/download-artifact@v4 | |
- name: Generate Artifact Attestation | |
uses: actions/attest-build-provenance@v1 | |
with: | |
subject-path: "wheels-*/*" | |
- name: Publish - `pypi.org` | |
uses: PyO3/maturin-action@v1 | |
env: | |
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }} | |
with: | |
args: --non-interactive --skip-existing wheels-*/* | |
command: upload |