Skip to content

chore: bump version #41

chore: bump version

chore: bump version #41

Workflow file for this run

name: Publish
on:
workflow_dispatch:
push:
branches: [ 'main' ]
tags: [ 'v**' ]
pull_request:
branches: [ 'main' ]
schedule:
- cron: '30 12 * * 0'
jobs:
build_sdist:
name: Build sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build sdist
run: |
pipx run build --sdist --outdir dist python
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
build_wheels:
name: Build wheels (${{ matrix.os }}-${{ matrix.architecture }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
architecture: [x86-64, aarch64]
include:
- os: windows-latest
architecture: x86-64
- os: macos-13
architecture: x86-64
- os: macos-latest
architecture: aarch64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Set Rust target (aarch64)
if: matrix.architecture == 'aarch64'
id: target
run: |
TARGET=$(
if [[ "${{ matrix.os }}" == "macos-latest" ]]; then
echo "aarch64-apple-darwin";
else
echo "aarch64-unknown-linux-gnu";
fi
)
echo "target=$TARGET" >> $GITHUB_OUTPUT
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
command: build
target: ${{ steps.target.outputs.target }}
args: --release --out dist -m python/Cargo.toml
manylinux: ${{ matrix.architecture == 'aarch64' && '2_24' || 'auto' }}
- name: Test wheels
if: matrix.architecture == 'x86-64'
shell: bash
run: |
python -m pip install --force-reinstall --verbose dist/*.whl
python -c 'import pymittagleffler'
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ matrix.architecture}}-${{ strategy.job-index }}
path: dist/*.whl
publish:
needs: [ 'build_sdist', 'build_wheels' ]
runs-on: ubuntu-latest
environment: pypi
permissions:
contents: write
id-token: write
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
defaults:
run:
working-directory: python
steps:
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1