Skip to content

v3.0.1 - Performance and Code Quality Improvements #8

v3.0.1 - Performance and Code Quality Improvements

v3.0.1 - Performance and Code Quality Improvements #8

Workflow file for this run

name: Release
on:
release:
types: [published]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build-wheels:
name: Build wheels
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install maturin
run: pip install maturin
- name: Build wheel
run: maturin build --release --strip -m crates/pyetwkit-core/Cargo.toml
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.python-version }}
path: target/wheels/*.whl
build-sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install maturin
run: pip install maturin
- name: Build sdist
run: maturin sdist -m crates/pyetwkit-core/Cargo.toml
- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: sdist
path: target/wheels/*.tar.gz
publish:
name: Publish to PyPI
runs-on: ubuntu-latest
needs: [build-wheels, build-sdist]
if: github.event_name == 'release'
environment: pypi
permissions:
id-token: write
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: dist/
merge-multiple: true
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist/