-
Notifications
You must be signed in to change notification settings - Fork 57
87 lines (77 loc) · 2.54 KB
/
Copy pathpypi.yml
File metadata and controls
87 lines (77 loc) · 2.54 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
name: "📦 PyPI "
on:
workflow_dispatch:
permissions:
contents: read
jobs:
# loop_common/loop_interpolation/loopstructural_visualisation are
# workspace-local deps of LoopStructural (see [tool.uv.sources] in
# pyproject.toml) — loop_common/loop_interpolation are runtime deps,
# loopstructural_visualisation backs the `visualisation`/`docs` extras.
# They must land on PyPI before the LoopStructural sdist below is
# uploaded, or `pip install LoopStructural[...]` breaks for anyone not
# using uv. map2loop (ROADMAP.md Stage 4, outcome 7) has no such reverse
# dependency — it rides in the same matrix purely for its own independent
# PyPI publishing, not for a gating reason.
make_sdist_packages:
name: Make SDist (${{ matrix.package }})
runs-on: ubuntu-latest
strategy:
matrix:
package: [loop_common, loop_interpolation, map2loop, loopstructural_visualisation]
steps:
- uses: actions/checkout@v4
- name: Build SDist
working-directory: packages/${{ matrix.package }}
run: |
pip install build
python -m build
- uses: actions/upload-artifact@v4
with:
name: dist-${{ matrix.package }}
path: packages/${{ matrix.package }}/dist/
upload_packages_to_pypi:
name: Upload ${{ matrix.package }} to PyPI
needs: ["make_sdist_packages"]
runs-on: "ubuntu-latest"
strategy:
matrix:
package: [loop_common, loop_interpolation, map2loop, loopstructural_visualisation]
steps:
- uses: actions/download-artifact@v4
with:
name: dist-${{ matrix.package }}
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
with:
skip_existing: true
verbose: true
user: ${{ secrets.PYPI_USERNAME }}
password: ${{ secrets.PYPI_PASSWORD }}
make_sdist:
name: Make SDist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build SDist
run: |
pip install build
python -m build
- uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
upload_to_pypi:
needs: ["make_sdist", "upload_packages_to_pypi"]
runs-on: "ubuntu-latest"
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
with:
skip_existing: true
verbose: true
user: ${{ secrets.PYPI_USERNAME }}
password: ${{ secrets.PYPI_PASSWORD }}