Commit 3af4de8
authored
fix(release): restore create-package.sh and set the core package version (#1429)
Publishing from `main` is currently broken in two ways. Found while
updating RELEASE.md (#1428).
1. `.github/workflows/npm-publish.yml` runs
`./scripts/create-package.sh` from `packages/react-native-executorch`,
but the rewrite scaffold (#1256) deleted that script. The workflow is
byte-identical to the one on `release/0.9`, so it was never updated for
the rewrite.
2. The core `package.json` still says `version: 0.0.0`, and that is the
exact field the workflow reads to decide what it publishes. Set to
`0.10.0`, matching the two adapter packages and `nativeLibsVersion`.
### Three deliberate changes from the release/0.9 copy
| change | why |
| --- | --- |
| `yarn prepare` instead of `yarn bob build` | `files` ships both `lib/`
and `legacy/`; prepare is `bob build && tsc -p legacy/tsconfig.json`.
Bob alone leaves `legacy/` out of the tarball. |
| version edited by pattern, not line 3 | `nativeLibsVersion` now sits
directly below `version`, so a positional edit is one inserted line away
from rewriting the wrong field. |
| `build.log` written with the packed file list | The workflow greps it
to assert no `node_modules` were packed, but nothing ever wrote the
file, so grep failed on a missing file and the check passed vacuously. |
The `build.log` content is the tarball listing rather than the pack
output on purpose: `npm pack` runs the `prepare` lifecycle, and bob logs
the path of the `tsc` binary it falls back to, which lives under
`node_modules` and fails the grep on a package that is perfectly clean.
That false positive showed up on the first test run.
### Verified by running the script
- builds `react-native-executorch-0.10.0.tgz`, 1020 files
- packed `package.json` says `0.10.0`
- zero `node_modules` entries in the tarball, and the workflow's grep
now returns 0
- `lib/` 496 files, `legacy/` 294 files
Not covered: the workflow itself is unchanged here, so the first real
publish is still the first end-to-end exercise of the CI path.1 parent 18c34cd commit 3af4de8
4 files changed
Lines changed: 85 additions & 2 deletions
File tree
- .github/workflows
- packages
- react-native-executorch-webrtc
- react-native-executorch
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
22 | 27 | | |
23 | 28 | | |
24 | 29 | | |
| |||
43 | 48 | | |
44 | 49 | | |
45 | 50 | | |
| 51 | + | |
46 | 52 | | |
47 | 53 | | |
48 | 54 | | |
| |||
144 | 150 | | |
145 | 151 | | |
146 | 152 | | |
| 153 | + | |
147 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
Lines changed: 69 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 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 | + | |
0 commit comments