Skip to content

also increase version in pyproject.toml #2

also increase version in pyproject.toml

also increase version in pyproject.toml #2

Workflow file for this run

name: Release PyPI
on:
push:
tags: ["si-units-v*"]
jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Build Wheels
uses: PyO3/maturin-action@v1
with:
manylinux: auto
command: build
args: --release --out dist -m si-units/Cargo.toml
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheel-linux-x86_64
path: dist
macos:
strategy:
matrix:
target: [ {arch: x64, target: x86_64}, {arch: arm64, target: aarch64} ]
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.11
architecture: ${{ matrix.target.arch }}
- name: Build wheels - ${{ matrix.target.target }}
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target.target }}
args: --release --out dist -m si-units/Cargo.toml
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheel-macos-${{ matrix.target.target }}
path: dist
windows:
runs-on: windows-latest
strategy:
matrix:
target: [x64, x86]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.11
architecture: ${{ matrix.target }}
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.target }}
args: --release --out dist -m si-units/Cargo.toml
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheel-windows-${{ matrix.target }}
path: dist
deploy-pypi:
name: Publish wheels to PyPI and TestPyPI
runs-on: ubuntu-latest
needs: [linux, windows, macos]
steps:
- uses: actions/download-artifact@v4
with:
pattern: wheel-*
path: wheels
merge-multiple: true
- uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Publish to PyPi
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
pip install --upgrade twine
twine upload --skip-existing wheels/*