Skip to content

Commit f6f2f7e

Browse files
committed
Merge branch '913-create_and_publish_wheel' into 'master'
Création et publication des wheels par GH actions See merge request 3d/cars-park/shareloc!204
2 parents 8bd3c92 + 1e7c5b1 commit f6f2f7e

File tree

3 files changed

+65
-4
lines changed

3 files changed

+65
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Create and Publish wheel
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build_wheels:
7+
name: Build wheels on ${{ matrix.os }}
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
matrix:
11+
os: [ubuntu-latest, windows-latest, macos-latest]
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- uses: actions/setup-python@v5
17+
18+
- name: Install cibuildwheel
19+
run: python -m pip install cibuildwheel==2.22.0
20+
21+
- name: Build wheels
22+
run: python -m cibuildwheel --output-dir wheelhouse
23+
24+
- uses: actions/upload-artifact@v4
25+
with:
26+
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
27+
path: ./wheelhouse/*.whl
28+
29+
build_sdist:
30+
name: Build source distribution
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v4
34+
35+
- name: Build sdist
36+
run: pipx run build --sdist
37+
38+
- uses: actions/upload-artifact@v4
39+
with:
40+
name: cibw-sdist
41+
path: dist/*.tar.gz
42+
43+
upload_pypi:
44+
name: Publish package on pypi
45+
needs: [build_wheels, build_sdist]
46+
runs-on: ubuntu-latest
47+
environment: pypi
48+
permissions:
49+
id-token: write
50+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
51+
steps:
52+
- uses: actions/download-artifact@v4
53+
with:
54+
pattern: cibw-*
55+
path: dist
56+
merge-multiple: true
57+
58+
- uses: pypa/gh-action-pypi-publish@release/v1
59+
with:
60+
repository-url: https://pypi.org/legacy/

CHANGELOG.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,11 @@ Only the first "Unreleased" section of this file corresponding of next release c
44
When publication of a new release, the section "Unreleased" is blocked to the next chosen version and name of the milestone at a given date.
55
A new section Unreleased is opened then for next dev phase.
66

7-
## Unreleased
7+
## 0.2.6 Cross-platforms wheels
88

99
### Added
1010

11-
### Changed
12-
13-
### Fixed
11+
- Add wheels in PyPI package for Windows and Ubuntu
1412

1513
## 0.2.5 Margins for rectification grid (January 2025)
1614

pyproject.toml

+3
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,6 @@ module = [
3131
'setuptools',
3232
]
3333
ignore_missing_imports = true
34+
35+
[tool.cibuildwheel]
36+
skip = ["pp*", "cp36-*", "cp37-*", "cp38-*"]

0 commit comments

Comments
 (0)