Skip to content

Modernize codebase to Python 3.10+ with updated type hints (#185) #97

Modernize codebase to Python 3.10+ with updated type hints (#185)

Modernize codebase to Python 3.10+ with updated type hints (#185) #97

Workflow file for this run

name: Release
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
release:
types:
- published
jobs:
Compiled:
name: Build Compiled Wheels
runs-on: ${{ matrix.os }}
permissions: write-all
strategy:
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-latest]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set Up Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.13"
cache: 'pip'
- name: Upgrade Dependencies
run: |
python -m pip install --upgrade build
python -m pip install --upgrade pip
python -m pip install --upgrade cibuildwheel~=2.23.2
- name: Build Project for Distribution
env:
CIBW_ENVIRONMENT: USE_MYPYC=1
CIBW_PLATFORM: ${{ matrix.platform }}
CIBW_ARCHS: "auto"
CIBW_BUILD: "cp3*"
CIBW_TEST_REQUIRES: pytest~=8.3
CIBW_TEST_COMMAND: pytest {package}/tests
run: python -m cibuildwheel --output-dir wheelhouse
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: openskill-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
Source:
name: Build Source Distribution
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Build Source
run: |
python -m pip install --upgrade build
python -m build --sdist --outdir wheelhouse
- uses: actions/upload-artifact@v4
with:
name: openskill-sdist
path: wheelhouse/*.tar.gz
Universal:
name: Build Universal Wheels
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Build Wheel
run: |
python -m pip install --upgrade build
python -m build --wheel --outdir wheelhouse
- uses: actions/upload-artifact@v4
with:
name: openskill-universal-wheel
path: wheelhouse/*.whl
Upload:
name: Upload Wheels to PyPi
needs: [Compiled, Source]
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v4
with:
pattern: openskill-*
path: wheelhouse
merge-multiple: true
- name: Publish Wheels to PyPi
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: wheelhouse/