-
Notifications
You must be signed in to change notification settings - Fork 8
96 lines (80 loc) · 2.17 KB
/
release.yml
File metadata and controls
96 lines (80 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Release
on:
push:
tags:
- "v*" # Runs only when a version tag (e.g., v1.0.0) is pushed.
jobs:
create_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
build_wheels:
name: Build wheels on ${{ matrix.platform }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
platform: manylinux
- os: macos-latest
platform: mac
- os: windows-latest
platform: windows
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install cibuildwheel
run: pipx install cibuildwheel==2.23.1
- name: Build wheels
run: cibuildwheel --output-dir wheelhouse .
- uses: actions/upload-artifact@v4
with:
name: wheels-${{ matrix.platform }}
path: wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build SDist
run: pipx run build --sdist
- uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/*.tar.gz
publish:
needs: [build_sdist, build_wheels]
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/project/compas_libigl
permissions:
id-token: write # Required for PyPI trusted publishing
steps:
- uses: actions/download-artifact@v4
with:
pattern: wheels-*
path: dist
merge-multiple: true
- uses: actions/download-artifact@v4
with:
name: sdist
path: dist
- name: List files before upload
run: ls -lhR dist
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1