Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 28 additions & 48 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -1,66 +1,46 @@
name: Build wheels

on: workflow_dispatch
# release
on: [push]

jobs:
build_wheels:
name: Build wheels on ${{matrix.os}} for Python ${{matrix.python_version}}
runs-on: ${{matrix.os}}
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-24.04, windows-2025, macos-15, macos-26]
python_version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
build:
name: Build wheels
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- uses: actions/checkout@v6
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: ${{matrix.python_version}}

- name: Install dependencies
python-version: 3.14
- name: Install build
run: |
python -m pip install --upgrade pip
pip install wheel
pip install build

- name: Build wheels
- name: Build
run:
python -m pip wheel --wheel-dir=./wheels .
python3 -m build

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: ${{matrix.os}}-py${{matrix.python_version}}.whl
path: ./wheels/*.whl
name: package-dist
path: dist

merge:
upload:
name: Upload wheels and sdist
runs-on: ubuntu-latest
needs: build_wheels
steps:
- name: Merge artifacts
uses: actions/upload-artifact/merge@v4
with:
name: wheels
pattern: "*-py*"

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- name: Setup python
uses: actions/setup-python@v6
with:
python-version: "3.13"

- name: Install build module
run: python -m pip install build

- name: Build sdist
run: python -m build --sdist
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
needs: [build]
environment:
name: pypi
url: https://pypi.org/p/online-monitor
permissions:
id-token: write

- uses: actions/upload-artifact@v4
with:
name: 'sdist.tar.gz'
path: dist/online_monitor*.tar.gz
steps:
- uses: actions/download-artifact@v8
with:
name: package-dist
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
Loading