Skip to content

SoftFloatPy 1.0.1

SoftFloatPy 1.0.1 #8

Workflow file for this run

name: Release of packages
on:
release:
types:
- published
jobs:
dist-on-linux:
name: Build distribution packages for Linux
strategy:
matrix:
os:
- ubuntu-24.04
- ubuntu-24.04-arm
python-version:
- '3.11'
- '3.12'
- '3.13'
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools wheel build cython
python -m pip install auditwheel
- name: Build wheel and source tarball
run: |
python -m build
auditwheel repair dist/softfloatpy-*.whl
mv dist/softfloatpy-*.tar.gz wheelhouse/.
- name: Store built wheel
uses: actions/upload-artifact@v6
with:
name: python-${{ matrix.python-version }}-package-for-${{ matrix.os }}
path: |
wheelhouse/softfloatpy-*.whl
wheelhouse/softfloatpy-*.tar.gz
retention-days: 1
dist-on-macos:
name: Build distribution packages for macOS
strategy:
matrix:
os:
# - macos-15
- macos-15-intel
python-version:
- '3.11'
- '3.12'
- '3.13'
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools wheel build cython
- name: Build wheel and source tarball
run: |
python -m build
- name: Store built wheel
uses: actions/upload-artifact@v6
with:
name: python-${{ matrix.python-version }}-package-for-${{ matrix.os }}
path: dist/softfloatpy-*.whl
retention-days: 1
dist-on-windows:
name: Build distribution packages for Windows
strategy:
matrix:
os:
- windows-2025
python-version:
- '3.11'
- '3.12'
- '3.13'
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools wheel build cython
- name: Build wheel and source tarball
run: |
python -m build
- name: Store built wheel
uses: actions/upload-artifact@v6
with:
name: python-${{ matrix.python-version }}-package-for-${{ matrix.os }}
path: dist/softfloatpy-*.whl
retention-days: 1
pypi:
name: Publish distribution
needs:
- dist-on-linux
- dist-on-macos
- dist-on-windows
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/softfloatpy
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download distribution
uses: actions/download-artifact@v7
with:
pattern: python-*-package-for-*
path: dist/
merge-multiple: true
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
github-release:
needs:
- dist-on-linux
- dist-on-macos
- dist-on-windows
runs-on: ubuntu-latest
permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases
id-token: write # IMPORTANT: mandatory for sigstore
steps:
- name: Download distribution
uses: actions/download-artifact@v7
with:
pattern: python-*-package-for-*
path: dist/
merge-multiple: true
- name: Sign distribution with Sigstore
uses: sigstore/[email protected]
with:
inputs: |
./dist/softfloatpy-*.whl
./dist/softfloatpy-*.tar.gz
- name: Upload artifact signatures to GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Upload to GitHub Release using the `gh` CLI.
# `dist/` contains the built packages, and the
# sigstore-produced signatures and certificates.
run: |
gh release upload '${{ github.ref_name }}' dist/** --repo '${{ github.repository }}' --clobber