Skip to content

Commit

Permalink
Merge branch '913-create_and_publish_wheel' into 'main'
Browse files Browse the repository at this point in the history
Création et publication des wheels par GH actions

See merge request 3d/cars-park/cars-filter!3
  • Loading branch information
dyoussef committed Feb 7, 2025
2 parents e908c5b + 3173304 commit 2f5d72d
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 1 deletion.
60 changes: 60 additions & 0 deletions .github/workflows/create-and-publish-wheel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Create and Publish wheel

on: [push, pull_request]

jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-13, macos-latest]

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5

- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.22.0

- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse

- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl

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

- name: Build sdist
run: pipx run build --sdist

- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz

upload_pypi:
name: Publish package on pypi
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true

- uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://pypi.org/legacy/
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 0.1.1 Cross-platforms wheels

### Added

- Add wheels in PyPI package for Windows, MacOS and Ubuntu

## 0.1.0 First Official Release (November 2024)

- First open-source release
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,7 @@ disable_error_code = 'attr-defined'
module = [
'setuptools',
]
ignore_missing_imports = true
ignore_missing_imports = true

[tool.cibuildwheel]
skip = ["pp*", "cp36-*", "cp37-*", "cp38-*"]

0 comments on commit 2f5d72d

Please sign in to comment.