Skip to content

Bump taiki-e/install-action from 2.32.9 to 2.32.13 #159

Bump taiki-e/install-action from 2.32.9 to 2.32.13

Bump taiki-e/install-action from 2.32.9 to 2.32.13 #159

Workflow file for this run

# SPDX-FileCopyrightText: 2024 Shun Sakai
#
# SPDX-License-Identifier: Apache-2.0 OR MIT
name: Release Python
on:
pull_request:
push:
branches:
- "develop"
tags:
- "abcrypt-py-v[0-9]+.[0-9]+.[0-9]+"
workflow_dispatch:
permissions:
contents: write
env:
CARGO_PROFILE_RELEASE_CODEGEN_UNITS: 1
CARGO_PROFILE_RELEASE_LTO: true
CARGO_PROFILE_RELEASE_PANIC: "abort"
jobs:
linux:
name: Build wheels for Linux
runs-on: ubuntu-22.04
strategy:
matrix:
target:
- aarch64
- x86_64
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12" # latest version
- "pypy3.8"
- "pypy3.9"
- "pypy3.10" # latest version
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Build wheels
uses: PyO3/[email protected]
with:
command: build
args: --strip -i ${{ matrix.python-version }} -o dist -r
manylinux: auto
target: ${{ matrix.target }}
working-directory: "crates/python"
sccache: "true"
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-python-${{ matrix.python-version }}-linux-${{ matrix.target }}
path: "crates/python/dist"
macos:
name: Build wheels for macOS
runs-on: macos-12
strategy:
matrix:
target:
- aarch64
- x86_64
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12" # latest version
- "pypy3.8"
- "pypy3.9"
- "pypy3.10" # latest version
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Build wheels
uses: PyO3/[email protected]
with:
command: build
args: --strip -i ${{ matrix.python-version }} -o dist -r
target: ${{ matrix.target }}
working-directory: "crates/python"
sccache: "true"
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-python-${{ matrix.python-version }}-macos-${{ matrix.target }}
path: "crates/python/dist"
windows:
name: Build wheels for Windows
runs-on: windows-2022
strategy:
matrix:
target:
- x64
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12" # latest version
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.target }}
- name: Build wheels
uses: PyO3/[email protected]
with:
command: build
args: --strip -i ${{ matrix.python-version }} -o dist -r
target: ${{ matrix.target }}
working-directory: "crates/python"
sccache: "true"
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: wheels-python-${{ matrix.python-version }}-windows-${{ matrix.target }}
path: "crates/python/dist"
sdist:
name: Build sdist
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build sdist
uses: PyO3/[email protected]
with:
command: sdist
args: -o dist
working-directory: "crates/python"
- name: Upload sdist
uses: actions/upload-artifact@v4
with:
name: wheels-sdist
path: "crates/python/dist"
release:
name: Release
needs:
- linux
- macos
- windows
- sdist
runs-on: ubuntu-22.04
steps:
- name: Download wheels
uses: actions/download-artifact@v4
with:
pattern: wheels-*
merge-multiple: true
- name: Publish to PyPI
uses: PyO3/[email protected]
if: startsWith(github.ref, 'refs/tags/')
with:
command: upload
args: --skip-existing --non-interactive *
env:
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}