Commit eeb6305
authored
fix(release): publish with relative paths, and stop skipping the wheel build (#6)
v0.1.3 reached neither registry. Two faults, both mine, both invisible to the
way I tested.
publish.sh used `node -p "require('${dir}/package.json')"`
- Node treats a path that does not begin with ./ or / as a MODULE specifier, so
`require('dist/npm/@modelslab/cli-linux-x64/package.json')` is a module lookup
that fails with MODULE_NOT_FOUND. It worked in every local test because those
passed absolute paths; CI passes a relative dist dir. Replaced with jq, which
reads a file as a file.
The PyPI guard was on the wrong step
- `if: always()` was on the upload alone. npm failed, the wheel BUILD was skipped
as an ordinary downstream skip, and the upload then ran and died on
"Cannot find file dist/pypi/*.whl". A guard on the last step of a chain
protects nothing. Every PyPI step now carries it, as `!cancelled()` so a
cancelled run still stops.
CI gains a dry-run of publish.sh against a stubbed npm, from the repo root with a
relative dist dir — the shape the release actually uses. It asserts seven
packages and that the unscoped entry package is published last. Both of the above
would have failed it.
Verified locally with a relative dist dir: the old call reproduces
"Cannot find module", the new one resolves, and the publisher emits all six
scoped platform packages followed by the entry package, with six wheels present
for the PyPI step.1 parent 13c6679 commit eeb6305
3 files changed
Lines changed: 38 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
91 | 115 | | |
92 | 116 | | |
93 | 117 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
87 | 92 | | |
| 93 | + | |
88 | 94 | | |
89 | 95 | | |
90 | 96 | | |
91 | 97 | | |
| 98 | + | |
92 | 99 | | |
93 | 100 | | |
94 | 101 | | |
| |||
100 | 107 | | |
101 | 108 | | |
102 | 109 | | |
103 | | - | |
| 110 | + | |
104 | 111 | | |
105 | 112 | | |
106 | 113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
38 | 42 | | |
39 | 43 | | |
40 | 44 | | |
| |||
0 commit comments