|
1 |
| -name: Build and Release Python Bindings to PyPI |
| 1 | +name: Release Python Bindings to PyPI |
2 | 2 |
|
3 | 3 | on:
|
4 | 4 | release:
|
5 | 5 | types: [published]
|
6 | 6 | workflow_dispatch:
|
7 | 7 | inputs:
|
8 |
| - tag: |
9 |
| - type: string |
10 |
| - default: '' |
11 |
| - required: false |
12 |
| - description: Ref to build |
13 | 8 | test_pypi:
|
14 | 9 | type: boolean
|
15 | 10 | description: 'Test release: publish on test.pypi.org'
|
16 | 11 | default: false
|
17 | 12 |
|
18 |
| -jobs: |
19 |
| - build-sdist: |
20 |
| - name: Build sdist |
21 |
| - runs-on: ubuntu-latest |
22 |
| - steps: |
23 |
| - - name: Checkout the repo |
24 |
| - uses: actions/checkout@v3 |
25 |
| - with: |
26 |
| - ref: ${{ github.event.inputs.tag }} |
27 |
| - |
28 |
| - - name: 🐍 Set up Python |
29 |
| - uses: actions/setup-python@v4 |
30 |
| - with: |
31 |
| - python-version: '3.11' |
32 |
| - |
33 |
| - - name: Install build dependencies |
34 |
| - run: | |
35 |
| - python -m pip install build |
36 |
| -
|
37 |
| - - name: 📦 Build the sdist |
38 |
| - working-directory: ./openvdb/openvdb/python |
39 |
| - run: | |
40 |
| - python -m build --sdist |
41 |
| -
|
42 |
| - - name: Upload artifact |
43 |
| - uses: actions/upload-artifact@v3 |
44 |
| - with: |
45 |
| - name: dist |
46 |
| - path: ./openvdb/openvdb/python/dist/ |
47 |
| - |
48 |
| - build-wheels: |
49 |
| - runs-on: ${{ matrix.os }} |
50 |
| - strategy: |
51 |
| - matrix: |
52 |
| - os: [ubuntu-latest, windows-latest, macos-latest] |
53 |
| - steps: |
54 |
| - - name: Checkout the repo |
55 |
| - uses: actions/checkout@v3 |
56 |
| - with: |
57 |
| - ref: ${{ github.event.inputs.tag }} |
58 |
| - |
59 |
| - |
60 |
| - - name: Build wheels |
61 |
| - |
62 |
| - with: |
63 |
| - package-dir: ./openvdb/openvdb/python |
64 |
| - config-file: ./openvdb/openvdb/python/pyproject.toml |
65 |
| - env: |
66 |
| - CIBW_ARCHS_MACOS: auto universal2 |
67 |
| - |
68 |
| - - name: Upload artifact |
69 |
| - uses: actions/upload-artifact@v3 |
70 |
| - with: |
71 |
| - name: dist |
72 |
| - path: ./openvdb/openvdb/python/dist/ |
73 |
| - |
74 | 13 | publish:
|
75 | 14 | name: Publish Python packages on PyPI
|
76 | 15 | needs: [build-sdist, build-wheels]
|
77 | 16 | runs-on: ubuntu-latest
|
78 | 17 | steps:
|
79 |
| - - name: Download artifacts |
80 |
| - uses: actions/download-artifact@v3 |
| 18 | + - name: Download artifacts from commit ${{ github.sha }} |
| 19 | + uses: dawidd6/action-download-artifact@v2 |
81 | 20 | with:
|
| 21 | + workflow: wheels.yml |
| 22 | + workflow_conclustion: success |
| 23 | + commit: ${{ github.sha }} |
82 | 24 | name: dist
|
83 | 25 | path: dist
|
84 | 26 |
|
|
0 commit comments