Model URLs in packages/react-native-executorch/src/models.ts are built from
BASE_URL plus one of two tag constants defined in the same file:
NEXT_VERSION_TAG— the in-development tag (resolve/v${MAJOR}.${NEXT_MINOR}.0). Models whose files are new or re-exported for the upcoming release point here. The HuggingFace files under this tag may not exist until release day.VERSION_TAG— the latest published stable tag (resolve/v${MAJOR}.${MINOR}.0). Models whose files last changed in a shipped release stay here, so a release does not repoint URLs whose artifacts did not change.
Both are plain string literals; there is no LIB_VERSION to derive them from.
Caution
These constants were renamed and their meanings swapped in v0.10. Before
that they lived in src/constants/modelUrls.ts / src/constants/versions.ts,
were derived from LIB_VERSION, and VERSION_TAG meant the in-development
tag while PREVIOUS_VERSION_TAG meant the published one. Today VERSION_TAG
is the published tag and NEXT_VERSION_TAG is the in-development one.
Editing VERSION_TAG by analogy with the old docs repoints every already
shipped model URL.
Anything that must stay pinned to a specific older HuggingFace tag (e.g.
deprecated aliases whose files were removed in a later release) should hardcode
resolve/v{MAJOR}.{MINOR}.0 directly in models.ts rather than reusing
VERSION_TAG.
The library resolves models from HuggingFace by tag, so publishing a .pte
to a model repo's main changes nothing for users until the release tag moves
to the commit holding it. Model repos are tagged independently of npm; a repo
only needs a tag move if its files changed this cycle.
For every model repo whose files changed:
- Confirm the new files are on
mainin the repo, and that their checksums match what was exported locally. - Move the
v{MAJOR}.{MINOR}.0tag to that commit (delete and recreate it). - Read the tag back and confirm it resolves to the intended commit.
Model card README.md files are generated from the repo tree and its
config.json files; the standard and the generated/free section split are
documented in
react-native-executorch-spec.
The release process of new minor version consists of the following steps:
-
On
main, confirm every model URL inpackages/react-native-executorch/src/models.tsthat should ship in this release points atNEXT_VERSION_TAG, and that the matching files exist on 🤗 huggingface under thev{MAJOR}.{MINOR}.0tag. See HuggingFace artifacts for moving those tags. -
Make sure
NEXT_VERSION_TAGinpackages/react-native-executorch/src/models.tsisresolve/v{MAJOR}.{MINOR}.0. -
Ensure the
versionfield ofpackage.jsonis{MAJOR}.{MINOR}.0for all four published packages:packages/react-native-executorch(core)packages/bare-resource-fetcherpackages/expo-resource-fetcherpackages/react-native-executorch-webrtc
The core publish workflow reads the version from
packages/react-native-executorch/package.json, so a wrong value there is what gets published. The satellite workflow takes an explicitversioninput instead.The two fetcher adapters are still required at
{MAJOR}.{MINOR}.0: the core package ships the pre-0.10 API asreact-native-executorch/legacy, and that path throws at runtime unless the consumer passes an adapter from one of them. Only the new API has a built-in fetcher. -
If any of the above required changes, commit them on
mainwith the message 'Release v{MAJOR}.{MINOR}.0'. -
Create a new release branch
release/{MAJOR}.{MINOR}frommainand push it to the remote. -
Confirm the native artifacts release the package resolves at install time exists and is not a draft.
scripts/download-libs.jsdownloads from the GitHub Release taggedv${nativeLibsVersion}-libs, withnativeLibsVersionpinned in the corepackage.json; if that release or any of its assets is missing, every consumer'spostinstallfails. -
Stability tests are performed on the release branch and all fixes to the new-found issues are pushed into the main branch and cherry-picked into the release branch. This allows for further development on the main branch without interfering with the release process.
-
Once all tests are passed, tag the release branch with proper version tag
v{MAJOR}.{MINOR}.0and run the following publish workflows. Both take adry-runinput; a dry run builds and packs without publishing, which is worth doing first since a failed publish cannot be taken back:- npm publish (core)
- npm publish satellite packages — run once per satellite package, selecting it via the
packageinput (react-native-executorch-bare-resource-fetcher,react-native-executorch-expo-resource-fetcher,react-native-executorch-webrtc)
-
Move the
legacydist-tag on npm to the previous minor line, for the core package and every satellite:npm dist-tag add react-native-executorch@{PREV_MAJOR}.{PREV_MINOR}.{HIGHEST_PATCH} legacyUse the previous line's highest published patch, not its
.0. Repeat for each satellite, whose patch numbers advance independently of the core (a satellite may have no release on that line at all, in which case it has nolegacytag to move).This is manual on purpose. The publish action derives a tag itself, but only ever as
latestfor the newest version orlegacyfor an older one, and when it pickslegacyit then runsnpm dist-tag rm <pkg> legacyon the way out. Nothing in the automation repointslegacyat the outgoing line, so skipping this step leaves it on whichever release last set it by hand. -
Create the release notes on GitHub.
-
Bump
mainto the next development cycle in a single PR:
- Bump
versioninpackage.jsonto{MAJOR}.{NEXT_MINOR}.0for all four published packages. LeavenativeLibsVersionalone; it names the GitHub artifacts release that exists today, and moving it ahead breaks every consumer'spostinstall. - In
models.ts, renameNEXT_VERSION_TAGtoVERSION_TAG, keeping its value atresolve/v{MAJOR}.{MINOR}.0(the version just published). This rewrites every model URL by construction, which is what you want: the URLs name the constant, not the tag, so bumping the value alone would silently repoint every model at a release that does not exist yet. - Do not add
NEXT_VERSION_TAGback yet. Exactly one of the two constants exists at a time: whichever has no reader failsnoUnusedLocals. The first model re-exported for the next release declaresNEXT_VERSION_TAG = 'resolve/v{MAJOR}.{NEXT_MINOR}.0'and points its own URL at it; the rest stay onVERSION_TAG. - Bump
LIB_VERSIONinpackages/react-native-executorch/src/fetcher/telemetry.tsto match. A unit test asserts it equals the package version, so a missed bump fails CI rather than mislabelling every download event for the release. - Commit with the message 'Bump version to v{MAJOR}.{NEXT_MINOR}.0'.
- Create versioned docs by running from repo root
(cd docs && yarn docs:version {MAJOR}.{MINOR}.x)(the 'x' part is intentional and is not to be substituted). Also, make sure that all the links inapi-referenceare not broken. - Create a PR with the updated docs.
- Update README.md with release video, if available.
- Update README.md links to release branch.
After the release branch is created and the version is published to npm we only allow for bug fixes and other critical changes to be included into the release branch. For this purpose we use git cherry-pick command.
Caution
Those changes should NOT include documentation changes, as they would be released automatically on the PR's merge and before the code changes are live. Instead create a separate PR with doc changes according to the Docs update section.
-
Create a PR with the fix to the
mainbranch. -
Once the PR is merged, create a new branch off
release/{MAJOR}.{MINOR}, cherry-pick the relevant commits frommain, and open a PR targetingrelease/{MAJOR}.{MINOR}. -
Once the PR is merged, bump version in
package.jsonof the core package and any adapter packages that require a fix to the new versionv{MAJOR}.{MINOR}.{REVISION}. Commit with a message 'Release v{MAJOR}.{MINOR}.{REVISION}'. -
Tag release branch with proper version tag
v{MAJOR}.{MINOR}.{REVISION}and run the relevant publish workflows:- npm publish (core)
- npm publish satellite packages — run once per affected satellite package via the
packageinput (if applicable)
A patch on an older line needs the
legacydist-tag re-added afterwards. The action publishes such a version underlegacyand then deletes the tag, so the line is left with nolegacypointer at all. -
Create release notes on GitHub.
We are using docusaurus with docs versioning. By default when merging PRs with docs changes to the main branch, a GitHub workflow is started to publish the docs. For this reason those changes should be merged only once the related changes are released. When updating docs the following steps should be considered.
- Update the desired doc pages.
- Check if the changes are applicable to past versions, if so make the same updates to the correct files in versioned docs inside
react-native-executorch/docs/versioned_docs/version-{MAJOR}.{MINOR}.x. - Create a PR to the main branch.